Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178184195
D62219.1796215054.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D62219.1796215054.diff
View Options
diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c
--- a/sys/netinet6/ip6_fastfwd.c
+++ b/sys/netinet6/ip6_fastfwd.c
@@ -53,6 +53,7 @@
#include <netinet6/in6_fib.h>
#include <netinet6/ip6_var.h>
#include <netinet6/nd6.h>
+#include <netinet6/scope6_var.h>
#if defined(SCTP) || defined(SCTP_SUPPORT)
#include <netinet/sctp_crc32.h>
@@ -64,8 +65,12 @@
{
struct nhop_object *nh;
+ /*
+ * A link-local next hop that a pfil hook chose (ipfw fwd) has its
+ * zone embedded in the address, not in sin6_scope_id.
+ */
nh = fib6_lookup(M_GETFIB(m), &dst->sin6_addr,
- dst->sin6_scope_id, NHR_NONE, m->m_pkthdr.flowid);
+ ntohs(in6_getscope(&dst->sin6_addr)), NHR_NONE, m->m_pkthdr.flowid);
if (nh == NULL) {
IP6STAT_INC(ip6s_noroute);
IP6STAT_INC(ip6s_cantforward);
diff --git a/tests/sys/netpfil/ipfw/fwd.sh b/tests/sys/netpfil/ipfw/fwd.sh
--- a/tests/sys/netpfil/ipfw/fwd.sh
+++ b/tests/sys/netpfil/ipfw/fwd.sh
@@ -96,6 +96,8 @@
# 2001:db8:4::1 lives on srv2, but the route points to srv1.
atf_check ifconfig -j srv1 ${epair_1}b inet6 2001:db8:2::2/64 up no_dad
atf_check ifconfig -j srv2 ${epair_2}b inet6 2001:db8:3::2/64 up no_dad
+ atf_check ifconfig -j srv2 ${epair_2}b inet6 fe80::2%${epair_2}b/64 \
+ alias
atf_check ifconfig -j srv2 lo0 inet6 2001:db8:4::1/128 up
atf_check -o ignore route -j srv2 add -6 default 2001:db8:3::1
@@ -103,14 +105,16 @@
"ipfw add 20 allow all from any to any"
atf_check -s exit:2 -o ignore ping -6 -c 1 -W 1 2001:db8:4::1
- firewall_config rtr ipfw ipfw \
- "ipfw add 10 fwd 2001:db8:3::2 ip6 from any to 2001:db8:4::1 in via ${epair_c}b" \
- "ipfw add 20 allow all from any to any"
+ for nexthop in 2001:db8:3::2 fe80::2%${epair_2}a; do
+ firewall_config rtr ipfw ipfw \
+ "ipfw add 10 fwd ${nexthop} ip6 from any to 2001:db8:4::1 in via ${epair_c}b" \
+ "ipfw add 20 allow all from any to any"
- for redirect in 0 1; do
- atf_check -o ignore \
- sysctl -j rtr net.inet6.ip6.redirect=${redirect}
- atf_check -o ignore ping -6 -c 1 -W 1 2001:db8:4::1
+ for redirect in 0 1; do
+ atf_check -o ignore \
+ sysctl -j rtr net.inet6.ip6.redirect=${redirect}
+ atf_check -o ignore ping -6 -c 1 -W 1 2001:db8:4::1
+ done
done
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 2, 12:37 PM (9 h, 20 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42126695
Default Alt Text
D62219.1796215054.diff (2 KB)
Attached To
Mode
D62219: netinet6: Keep the zone of a pfil-chosen next hop in ip6_tryforward()
Attached
Detach File
Event Timeline