Date: Sat, 5 Sep 2009 17:35:31 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r196868 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet6 Message-ID: <200909051735.n85HZVNd059893@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: qingli Date: Sat Sep 5 17:35:31 2009 New Revision: 196868 URL: http://svn.freebsd.org/changeset/base/196868 Log: MFC r196865 This patch fixes an address scope violation. Considering the scenario where an anycast address is assigned on one interface, and a global address with the same scope is assigned on another interface. In other words, the interface owns the anycast address has only the link-local address as one other address. Without this patch, "ping6" the anycast address from another station will observe the source address of the returned ICMP6 echo reply has the link-local address, not the global address that exists on the other interface in the same node. Reviewed by: bz Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet6/icmp6.c Modified: stable/8/sys/netinet6/icmp6.c ============================================================================== --- stable/8/sys/netinet6/icmp6.c Sat Sep 5 17:29:08 2009 (r196867) +++ stable/8/sys/netinet6/icmp6.c Sat Sep 5 17:35:31 2009 (r196868) @@ -2170,6 +2170,10 @@ icmp6_reflect(struct mbuf *m, size_t off } } + if ((srcp != NULL) && + (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) + srcp = NULL; + if (srcp == NULL) { int e; struct sockaddr_in6 sin6;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909051735.n85HZVNd059893>