From 007a5634b29307c12a066cf0086b3f01b8bded8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fengbojiang=28=E5=A7=9C=E5=87=A4=E6=B3=A2=29?= Date: Fri, 22 Nov 2019 15:57:05 +0800 Subject: [PATCH] The icmp6(4) protocol has been updated to fix ICMPv6 redirects. Corresponding upstream changeset from https://svnweb.freebsd.org/base/stable/11/sys/netinet6/icmp6.c?r1=329581&r2=329580&pathrev=329581. --- freebsd/netinet6/icmp6.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/freebsd/netinet6/icmp6.c b/freebsd/netinet6/icmp6.c index 69bb60fc..c4ecef4a 100644 --- a/freebsd/netinet6/icmp6.c +++ b/freebsd/netinet6/icmp6.c @@ -2357,6 +2357,14 @@ icmp6_redirect_input(struct mbuf *m, int off) goto bad; } + /* + * Embed scope zone id into next hop address, since + * fib6_lookup_nh_basic() returns address without embedded + * scope zone id. + */ + if (in6_setscope(&nh6.nh_addr, m->m_pkthdr.rcvif, NULL)) + goto freeit; + if (IN6_ARE_ADDR_EQUAL(&src6, &nh6.nh_addr) == 0) { nd6log((LOG_ERR, "ICMP6 redirect rejected; "