svn commit: r272860 - stable/10/usr.sbin/route6d

Hiroki Sato hrs at FreeBSD.org
Thu Oct 9 23:30:52 UTC 2014


Author: hrs
Date: Thu Oct  9 23:30:51 2014
New Revision: 272860
URL: https://svnweb.freebsd.org/changeset/base/272860

Log:
  MFC r270234:
  
    Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index
    where a RIP packet was received.  This fixes a bug which prevented gateway
    addresses in fe80::/64 from being added.

Modified:
  stable/10/usr.sbin/route6d/route6d.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/route6d/route6d.c
==============================================================================
--- stable/10/usr.sbin/route6d/route6d.c	Thu Oct  9 23:29:44 2014	(r272859)
+++ stable/10/usr.sbin/route6d/route6d.c	Thu Oct  9 23:30:51 2014	(r272860)
@@ -2838,6 +2838,8 @@ addroute(struct riprt *rrt,
 	sin6->sin6_len = sizeof(struct sockaddr_in6);
 	sin6->sin6_family = AF_INET6;
 	sin6->sin6_addr = *gw;
+	if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
+		sin6->sin6_scope_id = ifcp->ifc_index;
 	sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len));
 	/* Netmask */
 	sin6->sin6_len = sizeof(struct sockaddr_in6);


More information about the svn-src-all mailing list