svn commit: r258468 - user/ae/inet6/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Fri Nov 22 05:25:04 UTC 2013


Author: ae
Date: Fri Nov 22 05:25:03 2013
New Revision: 258468
URL: http://svnweb.freebsd.org/changeset/base/258468

Log:
  Use in6_getscopezone instead of sa6_recoverscope to initialize
  sin6_scope_id for LLA.

Modified:
  user/ae/inet6/sys/netinet6/in6.c

Modified: user/ae/inet6/sys/netinet6/in6.c
==============================================================================
--- user/ae/inet6/sys/netinet6/in6.c	Fri Nov 22 05:02:37 2013	(r258467)
+++ user/ae/inet6/sys/netinet6/in6.c	Fri Nov 22 05:25:03 2013	(r258468)
@@ -2261,11 +2261,10 @@ in6_lltable_dump(struct lltable *llt, st
 			ndpc.rtm.rtm_type = RTM_GET;
 			ndpc.rtm.rtm_flags = RTF_UP;
 			ndpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY;
-			ndpc.sin6.sin6_family = AF_INET6;
-			ndpc.sin6.sin6_len = sizeof(ndpc.sin6);
 			bcopy(L3_ADDR(lle), &ndpc.sin6, L3_ADDR_LEN(lle));
-			if (V_deembed_scopeid)
-				sa6_recoverscope(&ndpc.sin6);
+			if (IN6_IS_ADDR_LINKLOCAL(&ndpc.sin6.sin6_addr))
+				ndpc.sin6.sin6_scope_id = in6_getscopezone(
+				    ifp, IPV6_ADDR_SCOPE_LINKLOCAL);
 
 			/* publish */
 			if (lle->la_flags & LLE_PUB)


More information about the svn-src-user mailing list