kern/163206: dhclient stopped working on wlan0 because of changes in CURRENT kernel between 2011-11-29 and 2011-12-12

Gleb Smirnoff glebius at FreeBSD.org
Mon Dec 12 15:30:05 UTC 2011


The following reply was made to PR kern/163206; it has been noted by GNATS.

From: Gleb Smirnoff <glebius at FreeBSD.org>
To: Ralf Wenk <IZ-FreeBSD0701 at hs-karlsruhe.de>
Cc: freebsd-gnats-submit at 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+--


More information about the freebsd-bugs mailing list