Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Oct 2014 23:30:52 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272860 - stable/10/usr.sbin/route6d
Message-ID:  <201410092330.s99NUqd9076768@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410092330.s99NUqd9076768>