mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00:00
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.
This commit is contained in:
parent
5a0fb8c8d6
commit
d292a6c795
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270234
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user