[haiku-commits] Re: haiku: hrev49293 - data/settings/network src/kits/network/libbind/irs src/kits/network/netresolv src/kits/network/libbind src/kits/network/netresolv/isc

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 15 Jun 2015 06:20:07 +0000

dd0ea64b5607: Missing NULL check in network stack.

This would trigger a KDL, it's better to just fail the syscall call.

Interestingly, prior to this commit, my system locks up entirely (no
Deskbar, Tracker, or even working mouse). With this "fix" in place, I
can now boot to the desktop, however, now DHCP fails to acquire an
address. I would have to guess that the call to update the interface
triggered by DHCP is now failing (and previously, causing some sort of
mayhem), suggesting there's a nasty regression with this commit.

I think it is unexpected that this function is called with a NULL parameter
(and it wasn't before). I expected that failing there would only move the
problem higher up in user space, but on my machine things started working.


I've tried grokking the massive netresolv commit, but nothing has
jumped out at me thus far... it would have been nice to see the
Haiku-specific changes as a separate commit to try and reduce the area
needed to grok...

As I mentionned, the changes come from netresolv:
http://wiki.netbsd.org/individual-software-releases/netresolv/

There isn't much haiku-specific code introduced in this change. What I did is
mostly:
- Apply the netresolv patches to our libbind (the only release is a patch
against latest libbind release, not a full tarball)
- Resolve conflicts
- Make some changes to the BSD compatibility library to add missing features
netresolv uses
- Remove deleted files from the jamfile
- Add new files to the jamfile only where needed (we don't include the DNS
server and a lot of other things)
- Implement getifaddrs
- Make some minor changes, such as using find_directory to locate the
configuration files.

The fact that netresolv is provided as a patch against libbind made it
difficult to work the other way around. This is why there is no separate commit
with Haiku changes.


Am I the only one experiencing issues with DHCP since this commit?

netresolv is tasked with DNS resolution only, so it seems unlikely that it
created issues in DHCP?

As I mentionned on IRC, my combination of laptop and wireless router fails at
DHCP in a similar way, but it already did before these changes. Another laptop
on the same router works fine, and this laptop on other wireless routers also
work fine. I have no DHCP issues after this change, on the wired interface of
either machine.

--
Adrien.

Other related posts: