Date: Wed, 20 Aug 2014 17:27:15 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270234 - head/usr.sbin/route6d Message-ID: <201408201727.s7KHRFQM019179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Wed Aug 20 17:27:15 2014 New Revision: 270234 URL: http://svnweb.freebsd.org/changeset/base/270234 Log: 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: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Wed Aug 20 17:26:05 2014 (r270233) +++ head/usr.sbin/route6d/route6d.c Wed Aug 20 17:27:15 2014 (r270234) @@ -2835,6 +2835,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?201408201727.s7KHRFQM019179>