Date: Tue, 31 Aug 2010 15:52:12 +0000 (UTC) From: Hajimu UMEMOTO <ume@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: r212056 - stable/8/sys/netinet6 Message-ID: <201008311552.o7VFqCkZ034661@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Tue Aug 31 15:52:12 2010 New Revision: 212056 URL: http://svn.freebsd.org/changeset/base/212056 Log: MFC r211435, r211530: Make `ping6 -I' work with net.inet6.ip6.use_defaultzone=1. Modified: stable/8/sys/netinet6/raw_ip6.c Directory Properties: 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) Modified: stable/8/sys/netinet6/raw_ip6.c ============================================================================== --- stable/8/sys/netinet6/raw_ip6.c Tue Aug 31 15:49:41 2010 (r212055) +++ stable/8/sys/netinet6/raw_ip6.c Tue Aug 31 15:52:12 2010 (r212056) @@ -401,6 +401,7 @@ rip6_output(m, va_alist) struct ifnet *oifp = NULL; int type = 0, code = 0; /* for ICMPv6 output statistics only */ int scope_ambiguous = 0; + int use_defzone = 0; struct in6_addr in6a; va_list ap; @@ -430,9 +431,12 @@ rip6_output(m, va_alist) * XXX: we may still need to determine the zone later. */ if (!(so->so_state & SS_ISCONNECTED)) { - if (dstsock->sin6_scope_id == 0 && !V_ip6_use_defzone) + if (!optp || !optp->ip6po_pktinfo || + !optp->ip6po_pktinfo->ipi6_ifindex) + use_defzone = V_ip6_use_defzone; + if (dstsock->sin6_scope_id == 0 && !use_defzone) scope_ambiguous = 1; - if ((error = sa6_embedscope(dstsock, V_ip6_use_defzone)) != 0) + if ((error = sa6_embedscope(dstsock, use_defzone)) != 0) goto bad; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008311552.o7VFqCkZ034661>