summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-03-03 09:45:16 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-03-03 09:45:16 +0000
commitf6428cdb1fbc5cf5d914f9b8d6f0db556e73b8a4 (patch)
tree5ff97dcbdd500d6616661d5eb10d126777053a97
parent228b87bc31468008c29a39017ebfc1adb33d7a44 (diff)
downloadsrc-test2-f6428cdb1fbc5cf5d914f9b8d6f0db556e73b8a4.tar.gz
src-test2-f6428cdb1fbc5cf5d914f9b8d6f0db556e73b8a4.zip
Notes
-rw-r--r--sys/netinet6/in6_fib.c4
-rw-r--r--sys/netinet6/ip6_fastfwd.c7
2 files changed, 2 insertions, 9 deletions
diff --git a/sys/netinet6/in6_fib.c b/sys/netinet6/in6_fib.c
index 51b7467904c6..0f471394d3ea 100644
--- a/sys/netinet6/in6_fib.c
+++ b/sys/netinet6/in6_fib.c
@@ -115,9 +115,9 @@ fib6_rte_to_nh_basic(struct rtentry *rte, const struct in6_addr *dst,
pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp));
if (rte->rt_flags & RTF_GATEWAY) {
+ /* Return address with embedded scope. */
gw = (struct sockaddr_in6 *)rte->rt_gateway;
pnh6->nh_addr = gw->sin6_addr;
- in6_clearscope(&pnh6->nh_addr);
} else
pnh6->nh_addr = *dst;
/* Set flags */
@@ -143,9 +143,9 @@ fib6_rte_to_nh_extended(struct rtentry *rte, const struct in6_addr *dst,
pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp));
if (rte->rt_flags & RTF_GATEWAY) {
+ /* Return address with embedded scope. */
gw = (struct sockaddr_in6 *)rte->rt_gateway;
pnh6->nh_addr = gw->sin6_addr;
- in6_clearscope(&pnh6->nh_addr);
} else
pnh6->nh_addr = *dst;
/* Set flags */
diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c
index 11eb0e7548d5..932005fbb74f 100644
--- a/sys/netinet6/ip6_fastfwd.c
+++ b/sys/netinet6/ip6_fastfwd.c
@@ -274,14 +274,7 @@ passout:
m_clrprotoflags(m); /* Avoid confusing lower layers. */
IP_PROBE(send, NULL, NULL, ip6, nh.nh_ifp, NULL, ip6);
- /*
- * XXX: we need to use destination address with embedded scope
- * zone id, because LLTABLE uses such form of addresses for lookup.
- */
dst.sin6_addr = nh.nh_addr;
- if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr))
- dst.sin6_addr.s6_addr16[1] = htons(nh.nh_ifp->if_index & 0xffff);
-
error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m,
(struct sockaddr *)&dst, NULL);
if (error != 0) {