[haiku-development] Network Issues. Part II. Yet another tile for the Puzzle ...

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 19 Nov 2009 23:34:40 +0100

Good evening, Axel!

Axel Dörfler schrieb:
The MAC address is not the problem; the IP address might be, though.
I have activated tracing in ipv4.cpp and see that "packed was not for us c0a8b301 -> c0a8b350". Additional tracing in mentioned datalink_is_local_address show me the iteration of "loop " with 1.0.0.127 and my "SiS191/0" with default autoconfig address. Frankly speaking it was not a big surprise for me. ;-) As was already cleared - Haiku network stack doesn't accept unicast packets for the "freshly" offered ip address.

After that I have added 0x0080 in flags to force server use broadcast answers for discover and request messages. And after reboot I become working DHCP autoconfiguration on my system.

At the moment I'm not familiar with such DHCP details but this
server (ISC-DHCP one) works well with other network devices and operating systems in ym home network. The only problematic combination is Haiku OS
and my driver in DHCP mode.

Since your driver received the packet, it cannot be the driver's fault anymore, but the problem has to be in the higher levels.

But the Problem with "driver-sensitive DHCP failure" is still not completely clear. I have acquired a tcpdump of DHCP auto-configuration session for rtl8169 NIC and found that it goes OK without of adding broadcast flag into discover and request messages! Looks like I have to investigate this case more. :-)

Regarding this problem I have following questions:

1) For what the net_server sends some data just after netwrok interface was up but _before_ the network link become really active? R5 drivers compatibility? My driver ignores this request and returns B_ERROR. I have to do this because NIC hardware will break data ring structures consistency in case sending data with non-active link. :-( I browsed through all network drivers sources in the Haiku repository and found no cases of handling this situation. May be that can be a difference and affect on data flow. 2) Which error code should I return form the Write IOCTL call in case the link is not active?

Thank you for the patience and attention!

---
Kind Regards,
 S.Zharski


Other related posts: