kern/146534: [icmp6] wrong source address in echo reply

jhell jhell at DataIX.net
Sat Sep 18 23:00:11 UTC 2010


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

From: jhell <jhell at DataIX.net>
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/146534: [icmp6] wrong source address in echo reply
Date: Sat, 18 Sep 2010 18:59:20 -0400

 This is a multi-part message in MIME format.
 --------------090904000205030606040405
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 On 09/18/2010 16:52, jhell wrote:
 > 
 > This PR seems to have been left behind. While it has been, I have tested
 > this patch for quite some time now with no downsides noted.
 > 
 > While this in fact fixes the noted problem, attached is a patch that
 > cleans this patch up a bit.
 > 
 > With this patch applied is correct behavior.
 > 
 
 Last patch agrbled ;)
 
 New attached patch non garbled ;)
 
 -- 
 
  jhell,v
 
 --------------090904000205030606040405
 Content-Type: text/plain;
  name="sys_netinet6_icmp6.c.patch.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="sys_netinet6_icmp6.c.patch.txt"
 
 --- sys/netinet6/icmp6.c	(revision 210616)
 +++ sys/netinet6/icmp6.c	(working copy)
 @@ -2162,8 +2162,21 @@
  	}
  
  	if ((srcp != NULL) && 
 -	    (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src)))
 -		srcp = NULL;
 +		(in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) {
 +			struct sockaddr_in6 sin6;
 + 
 +		bzero(&sin6, sizeof(sin6));
 +		sin6.sin6_family = AF_INET6;
 +		sin6.sin6_len = sizeof(sin6);
 +		sin6.sin6_addr = origdst;
 +
 +		ia = (struct in6_ifaddr *)
 +			ifa_ifwithaddr((struct sockaddr *)&sin6);
 +
 +		if (ia && (ia->ia6_flags & IN6_IFF_ANYCAST))
 +			srcp = NULL;
 +	}
 +
  
  	if (srcp == NULL) {
  		int e;
 
 --------------090904000205030606040405--


More information about the freebsd-net mailing list