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#1393 - netifd: "ubus call network reload" can't remove the deprecated ipv6 prefix delegation on lan #5814
Comments
alfred.song: I found that after DHCPv6 wan connection is removed, the ipv6 prefix assignment has been removed from netifd database of lan interface. It is just the ipv6 address assignment of br-lan is still there in linux protocol stack.
[CXNK001D8F15] /lib/netifd/proto # ifstatus lan
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 1981,
"l3_device": "br-lan",
"proto": "static",
"device": "br-lan",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "192.168.1.1",
"mask": 24
}
],
"ipv6-address": [
2 Remove the DHCPv6 wan connection. As you can see in the dump below, the "ipv6-prefix-assignment" has been removed from netifd database, but ipv6 address assignment is still there.
|
alfred.song: It looks like something are missing in netifd to clear the deprecated ipv6 address of linux protocol stack. |
alfred.song: netifd maintains a state machine for each interface. |
dedeckeh: The delegated IPv6 address is invalidated by netifd by setting the preferred and valid lifetime to 0 which can be checked by inspecting the output of ip -6 addr show. |
alfred.song: Hi Hans, I re-checked the lifetime, routing, and odhcpd behavior following your comments.
ip -6 addr show
......
10: br-lan: mtu 1500
inet6 2001:db8:3200::1/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2001:db8:ffff:f000::1/64 scope global deprecated noprefixroute dynamic
valid_lft 42sec preferred_lft 0sec
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
......
I believe this is acceptable. Thanks for the reply. |
dedeckeh: Not removing the IPv6 address allows odhcpd to announce the IPv6 prefix as deprecated; this allows downstream devices to detect the IPv6 prefix as deprecated in a fast way and possible fast switch over to a valid IPv6 prefix |
alfred.song: Yes, indeed.
Thanks for the clarification. |
alfred.song: Hans, Can you please give me a hint on where the preferred lifetime and valid lifetime are set to 0 in the code? |
alfred.song:
Supply the following if possible:
OpenWrt Chaos Calmer 15.05.1
netifd release: 0f96606b7040b8e14190ff055d5761744bc15f6d Tue Oct 17 22:16:43 2017 +0200
"ubus call network reload" can't remove the deprecated ipv6 prefix delegation on lan interface
[CXNK001D8F15] /etc # cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'auto'
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
option peerdns '1'
option defaultroute '1'
option vendorid '844Ei.ONT.dslforum.org'
option reqopts '43 120 121'
config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
option peerdns '1'
option defaultroute '1'
option reqopts '17'
option reqaddress 'try'
option reqprefix 'auto'
[] /etc # ifconfig br-lan
br-lan Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:db8:ffff:f000::1/64 Scope:Global
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:3598 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7094 (6.9 KiB) TX bytes:1784866 (1.7 MiB)
[CXNK001D8F15] /etc # cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'auto'
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
option peerdns '1'
option defaultroute '1'
option vendorid '844Ei.ONT.dslforum.org'
option reqopts '43 120 121'
[] /etc # ifconfig br-lan
br-lan Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:db8:ffff:f000::1/64 Scope:Global
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:3419 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7094 (6.9 KiB) TX bytes:1695840 (1.6 MiB)
"ubus call network restart" can fix this, but it is not preferred, for it will restart other unchanged interfaces too.
This seems to be a bug in netifd. My netifd release is 0f96606b7040b8e14190ff055d5761744bc15f6d.
Thanks.
The text was updated successfully, but these errors were encountered: