https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196361
--- Comment #9 from jhujh...@adjectivism.org --- Created attachment 178192 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=178192&action=edit Respect net.add_addr_allfibs=0 for inet6 (revision 1) I didn't forget about this! I implemented against 10.3 about a year ago and finally found the time to port it to HEAD. This patch essentially makes IPv6 respect net.add_addr_allfibs the same way IPv4 does. This is my first patch against base - any feedback is welcome. The changes here are mostly straightforward: where we have an ifp, we can use its FIB, and where we've previously assumed the default FIB, we should consider that local routes can exist outside of it now. A couple changes are more noteworthy: * Default router selection (defrouter_ functions) can select multiple routers, up to one per FIB. defrouter_select() now takes a FIB argument to simplify the logic inside the function. It is up to the caller to determine if we should re-select routers for all FIBs, by making multiple calls, or not. * In icmp6_reflect(), there may be an edge case where source address selection fails to use the correct FIB if in6ifa_ifwithaddr() returns NULL. I don't fully understand the situations in which this can happen (or if it's possible at all). * rtinit() didn't use the interface's FIB for both AF_INET as well as AF_INET6 and I don't understand why. For all uses of the function in AF_INET context, using the interface FIB seems correct to me, but previous in_addprefix() and rip_ctlinput() seem a little strange. Here's what this looks like when net.add_addr_allfibs is 0. em0 and epair0b here are bridged together and there is a router advertising fd00::/64. em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=42098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWTSO> ether e0:cb:4e:00:5c:99 inet6 fe80::e2cb:4eff:fe00:5c99%em0 prefixlen 64 scopeid 0x1 inet6 fd00::e2cb:4eff:fe00:5c99 prefixlen 64 autoconf nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> media: Ethernet autoselect (1000baseT <full-duplex>) status: active epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 04:ef:30:02:88:af inet6 fe80::6ef:30ff:fe02:88af%epair0b prefixlen 64 scopeid 0x6 inet6 fd00::6ef:30ff:fe02:88af prefixlen 64 autoconf nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active fib: 1 groups: epair % ndp -na Neighbor Linklayer Address Netif Expire S Flags fe80::ff:30ff:fe02:80d%epair0b 02:ff:30:02:08:0d epair0b 23h45m16s S R fd00::6ef:30ff:fe02:88af 04:ef:30:02:88:af epair0b permanent R fe80::6ef:30ff:fe02:88af%epair0b 04:ef:30:02:88:af epair0b permanent R fe80::ff:30ff:fe02:80d%em0 02:ff:30:02:08:0d em0 23h43m46s S R fd00::e2cb:4eff:fe00:5c99 e0:cb:4e:00:5c:99 em0 permanent R fe80::e2cb:4eff:fe00:5c99%em0 e0:cb:4e:00:5c:99 em0 permanent R % ndp -np fd00::/64 if=epair0b flags=LAO vltime=600, pltime=300, expire=8m8s, ref=1 advertised by fe80::ff:30ff:fe02:80d%epair0b (reachable) fe80::%epair0b/64 if=epair0b flags=LAO vltime=infinity, pltime=infinity, expire=Never, ref=0 No advertising router fd00::/64 if=em0 flags=LAO vltime=600, pltime=300, expire=8m8s, ref=1 advertised by fe80::ff:30ff:fe02:80d%em0 (reachable) fe80::%em0/64 if=em0 flags=LAO vltime=infinity, pltime=infinity, expire=Never, ref=0 No advertising router fe80::%lo0/64 if=lo0 flags=LAO vltime=infinity, pltime=infinity, expire=Never, ref=0 No advertising router % netstat -rnf inet6 -F0 Routing tables Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRS lo0 default fe80::ff:30ff:fe02:80d%em0 UG em0 ::1 link#3 UH lo0 ::ffff:0.0.0.0/96 ::1 UGRS lo0 fd00::/64 link#1 U em0 fd00::e2cb:4eff:fe00:5c99 link#1 UHS lo0 fe80::/10 ::1 UGRS lo0 fe80::%em0/64 link#1 U em0 fe80::e2cb:4eff:fe00:5c99%em0 link#1 UHS lo0 fe80::%lo0/64 link#3 U lo0 fe80::1%lo0 link#3 UHS lo0 ff02::/16 ::1 UGRS lo0 % netstat -rnf inet6 -F1 Routing tables (fib: 1) Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRS lo0 default fe80::ff:30ff:fe02:80d%epair0b UG epair0b ::1 lo0 UHS lo0 ::ffff:0.0.0.0/96 ::1 UGRS lo0 fd00::/64 link#6 U epair0b fd00::6ef:30ff:fe02:88af link#6 UHS lo0 fe80::/10 ::1 UGRS lo0 fe80::%epair0b/64 link#6 U epair0b fe80::6ef:30ff:fe02:88af%epair0b link#6 UHS lo0 ff02::/16 ::1 UGRS lo0 % ifmcstat -f inet6 em0: inet6 fe80::e2cb:4eff:fe00:5c99%em0 scopeid 0x1 mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3 group ff01::1%em0 scopeid 0x1 mode exclude mcast-macaddr 33:33:00:00:00:01 group ff02::2:c26b:b618%em0 scopeid 0x1 mode exclude mcast-macaddr 33:33:c2:6b:b6:18 group ff02::2:ffc2:6bb6%em0 scopeid 0x1 mode exclude mcast-macaddr 33:33:ff:c2:6b:b6 group ff02::1%em0 scopeid 0x1 mode exclude mcast-macaddr 33:33:00:00:00:01 group ff02::1:ff00:5c99%em0 scopeid 0x1 mode exclude mcast-macaddr 33:33:ff:00:5c:99 lo0: inet6 fe80::1%lo0 scopeid 0x3 mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3 group ff01::1%lo0 scopeid 0x3 mode exclude group ff02::2:c26b:b618%lo0 scopeid 0x3 mode exclude group ff02::2:ffc2:6bb6%lo0 scopeid 0x3 mode exclude group ff02::1%lo0 scopeid 0x3 mode exclude group ff02::1:ff00:1%lo0 scopeid 0x3 mode exclude epair0b: inet6 fe80::6ef:30ff:fe02:88af%epair0b scopeid 0x6 mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3 group ff01::1%epair0b scopeid 0x6 mode exclude mcast-macaddr 33:33:00:00:00:01 group ff02::2:c26b:b618%epair0b scopeid 0x6 mode exclude mcast-macaddr 33:33:c2:6b:b6:18 group ff02::2:ffc2:6bb6%epair0b scopeid 0x6 mode exclude mcast-macaddr 33:33:ff:c2:6b:b6 group ff02::1%epair0b scopeid 0x6 mode exclude mcast-macaddr 33:33:00:00:00:01 group ff02::1:ff02:88af%epair0b scopeid 0x6 mode exclude mcast-macaddr 33:33:ff:02:88:af -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"