Bug #12790
closedLink-Local IPv6 address on WAN with MAC spoofing changes if there is an IP Alias on WAN
0%
Description
Created based on https://forum.netgate.com/topic/169727/link-local-address-behavior-when-spoofing-wan-interface-mac-address
Client tested on 21.05_2 but I tested on 22.01-RELEASE (amd64) built on Mon Feb 07 16:37:59 UTC 2022
When I used MAC Spoofing (MAC: 00:90:0b:18:ac:ca) on WAN (igb0) with 'IPv4/IPv6: DHCP' and rebooted SG-5100 I got
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: WAN
options=e100bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,RXCSUM_IPV6,TXCSUM_IPV6>
ether 00:90:0b:18:ac:ca
hwaddr 00:90:0b:7a:84:4d
inet6 fe80::290:bff:fe18:acca%igb0 prefixlen 64 scopeid 0x1
inet6 2001:470:71:839:290:bff:fe18:acca prefixlen 64 autoconf
inet6 2001:470:71:839::1146 prefixlen 128
inet 172.21.36.148 netmask 0xffffff00 broadcast 172.21.36.255
inet 192.168.100.121 netmask 0xffffff00 broadcast 192.168.100.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
so Link-Local IPv6 address were created based on this spoofed MAC.
BUT if I add IP Alias bundled with WAN interface and reboot I got
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: WAN
options=e100bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,RXCSUM_IPV6,TXCSUM_IPV6>
ether 00:90:0b:18:ac:ca
hwaddr 00:90:0b:7a:84:4d
inet6 fe80::290:bff:fe7a:844 d%igb0 prefixlen 64 scopeid 0x1
inet6 2001:470:71:839:290:bff:fe7a:844d prefixlen 64 autoconf
inet6 2001:470:71:839::1146 prefixlen 128
inet 172.21.36.148 netmask 0xffffff00 broadcast 172.21.36.255
inet 192.168.100.121 netmask 0xffffff00 broadcast 192.168.100.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
so in this case Link-Local IPv6 address were changed and created based on hardware MAC but not based on spoofed MAC.
So adding IP Alias changed the logic of creating the Link-Local IPv6 address.
Related issues