Bug #15057
closedRouter Advertisement daemon does not prioritize IPv6 GUA over ULA
0%
Description
When saving or reloading radvd service, the conf file is regenerated
If the interface has a public track interface and a private ULA address, the private address may be mistakenly chosen as the track interface IPv6
Updated by Mathis Cavalli 12 months ago
Marcos M wrote in #note-1:
Try this patch (apply with the system patches package): {{collapse
[...]
}}
Just tried it, didn't work
I made a patch on github which did the job
https://github.com/pfsense/pfsense/pull/4659
but thanks for your answer, appreciate that
Updated by Marcos M 11 months ago
I'm not able to replicate this on 23.09 (should be the same as 2.7.1 for this issue). Regardless of whether the ULA comes before or after the GUA, the function returns the GUA:
# ifconfig output vmx0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 description: WAN options=4e100bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG> ether 00:50:56:b2:23:2f inet 10.0.5.235 netmask 0xffffff00 broadcast 10.0.5.255 inet6 fe80::250:56ff:feb2:232f%vmx0 prefixlen 64 scopeid 0x1 inet6 fc00::250:56ff:feb2:232f prefixlen 128 inet6 2001:db8:db8:db8:db8:a85f:46ef:e240 prefixlen 128 pltime 4500 vltime 7200 media: Ethernet autoselect status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> # php function output var_dump(get_interface_track6ip('wan')); array(2) { [0]=> string(32) "2001:db8:db8:db8:db8:a85f:46ef:e240" [1]=> string(3) "128" }
What pfSense version are you running, and what is the output for the above (test under Diagnostics > Command Prompt)?
Updated by Mathis Cavalli 11 months ago
I rolled back my change to get_interface_track6ip to show you what it returns with the original code
# ifconfig output bridge0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 description: LAN options=0 ether 58:9c:fc:10:97:0f inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::5a9c:fcff:fe10:970f%bridge0 prefixlen 64 scopeid 0x13 inet6 fe80::1:1%bridge0 prefixlen 64 scopeid 0x13 inet6 fc00:: prefixlen 64 inet6 2a01:cb08:e53:1300:5a9c:fcff:fe10:970f prefixlen 64 inet6 fd00:: prefixlen 64 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: ix3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 8 priority 128 path cost 200000 member: igc3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 4 priority 128 path cost 55 member: igc2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 3 priority 128 path cost 2000000 member: igc1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 2 priority 128 path cost 55 member: igc0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 1 priority 128 path cost 55 member: ix1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 6 priority 128 path cost 2000 member: ix2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 7 priority 128 path cost 2000 groups: bridge nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> # php output (wan has no ipv6 assigned, only lan has) var_dump(get_interface_track6ip('lan')); array(2) { [0]=> string(6) "fc00::" [1]=> string(2) "64" }
I'm using 23.09 too, i set 2.7.1 as affected version but as you say it should be the same
Updated by Marcos M 11 months ago
- Subject changed from local private ipv6 is being used instead of public track interface IPv6 in radvd to radvd does not prioritize IPv6 GUA over ULA
- Status changed from Incomplete to Pull Request Review
- Assignee set to Marcos M
- Target version set to 2.8.0
- Plus Target Version set to 24.03
Thanks! I was able to reproduce and confirm the issue. Please test the following patch: Show
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/1112
Updated by Mathis Cavalli 11 months ago
It works !
get_interface_track6ip now returns the GUA as expected, and radvd config file is correct
Thank you
Updated by Jim Pingle 10 months ago
- Subject changed from radvd does not prioritize IPv6 GUA over ULA to Router Advertisement daemon does not prioritize IPv6 GUA over ULA