Date: Mon, 12 Dec 2011 15:30:05 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/163206: dhclient stopped working on wlan0 because of changes in CURRENT kernel between 2011-11-29 and 2011-12-12 Message-ID: <201112121530.pBCFU5PF074376@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/163206; it has been noted by GNATS. From: Gleb Smirnoff <glebius@FreeBSD.org> To: Ralf Wenk <IZ-FreeBSD0701@hs-karlsruhe.de> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/163206: dhclient stopped working on wlan0 because of changes in CURRENT kernel between 2011-11-29 and 2011-12-12 Date: Mon, 12 Dec 2011 19:25:11 +0400 --ZwgA9U+XZDXt4+m+ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Ralf, can you please perform two tests: 1) Back out the r228313 revision and try again. http://svnweb.freebsd.org/base?view=revision&revision=228313 2) Return the tree back to normal state (including r228313) and try the attached patch. -- Totus tuus, Glebius. --ZwgA9U+XZDXt4+m+ Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="in.c.diff" Index: in.c =================================================================== --- in.c (revision 228438) +++ in.c (working copy) @@ -1072,7 +1072,7 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) { struct in_ifaddr *ia; - struct in_addr prefix, mask, p; + struct in_addr prefix, mask, p, m; int error = 0; struct sockaddr_in prefix0, mask0; @@ -1133,15 +1133,22 @@ IN_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { - if (rtinitflags(ia)) + if (rtinitflags(ia)) { p = ia->ia_dstaddr.sin_addr; - else { + + if (prefix.s_addr != p.s_addr) + continue; + } else { p = ia->ia_addr.sin_addr; - p.s_addr &= ia->ia_sockmask.sin_addr.s_addr; + m = ia->ia_sockmask.sin_addr; + p.s_addr &= m.s_addr; + + if (prefix.s_addr != p.s_addr || + mask.s_addr != m.s_addr) + continue; } - if ((prefix.s_addr != p.s_addr) || - !(ia->ia_ifp->if_flags & IFF_UP)) + if ((ia->ia_ifp->if_flags & IFF_UP) == 0) continue; /* --ZwgA9U+XZDXt4+m+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112121530.pBCFU5PF074376>