Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1668 - netifd: ip6ifaceid='eui64' broken when type is not bridge #6689

Closed
openwrt-bot opened this issue Jul 17, 2018 · 0 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

luizluca:

Netifd uses a all-zero mac address when interface is not a bridge and ip6ifaceid is 'eui64'.

It happens on x86/generic and x86/64, both with Trunk (r7516-ac10975) and 18.06rc1.

root@OpenWrt:# uci set network.lan.ip6assign='64'
root@OpenWrt:
# uci set network.lan.ip6prefix='fdc8:1234:5678:abcd::/64'
root@OpenWrt:# uci set network.lan.ip6ifaceid='eui64'
root@OpenWrt:
# uci delete network.globals.ula_prefix #just to avoid also listing ULA addressses
root@OpenWrt:# uci delete network.lan.type
root@OpenWrt:
# uci commit
root@OpenWrt:# /etc/init.d/network restart
root@OpenWrt:
# ip -6 link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
link/ether 08:00:27:b7:ae:8e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
link/ether 08:00:27:a7:cc:ce brd ff:ff:ff:ff:ff:ff
root@OpenWrt:~# ip -6 address show scope global
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 1000
inet6 fdc8:1234:5678:abcd:200:ff:fe00:0/64 scope global
valid_lft forever preferred_lft forever

In this case, Host ID for eth0 is ::200:ff:fe00:0, which is generated when mac is 00:00:00:00:00:00.

If type is bridge, it can read the mac address and get the correct IPv6 address.
Another workaround is to force macaddr for that interface:

root@OpenWrt:# uci set network.lan.macaddr='08:00:27:b7:ae:8e'
root@OpenWrt:
# uci commit
root@OpenWrt:# /etc/init.d/network restart
root@OpenWrt:
# ip -6 address show scope global
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 1000
inet6 fdc8:1234:5678:abcd:a00:27ff:feb7:ae8e/64 scope global
valid_lft forever preferred_lft forever

The address fdc8:1234:5678:abcd:a00:27ff:feb7:ae8e is the expected output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant