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

Invalid preferred life times in router advertisements #10804

Open
jorti opened this issue Sep 24, 2022 · 3 comments
Open

Invalid preferred life times in router advertisements #10804

jorti opened this issue Sep 24, 2022 · 3 comments

Comments

@jorti
Copy link

jorti commented Sep 24, 2022

Hi,

After upgrading to OpenWrt 22.03, I've noticed a weird thing. My Linux clients are logging these error messages:

kernel: IPv6: addrconf: prefix option has invalid lifetime

I have a DHCP configuration like shown below. I'm using a life time of 30min for the DHCP leases and the option ra_useleasetime should make the leasetime to be also used as limit and preferred lifetime of the IPv6 prefix.

# uci show dhcp.lab
dhcp.lab=dhcp
dhcp.lab.interface='lab'
dhcp.lab.start='100'
dhcp.lab.limit='150'
dhcp.lab.ra='server'
dhcp.lab.dhcpv6='server'
dhcp.lab.dhcp_option='6,192.168.5.1'
dhcp.lab.ra_flags='managed-config' 'other-config'
dhcp.lab.ra_slaac='0'
dhcp.lab.ra_useleasetime='1'
dhcp.lab.leasetime='30m'

However, I'm getting invalid preferred lifetimes for the advertised prefixes:

18:42:08.550221 IP6 (flowlabel 0xe72ec, hlim 255, next-header ICMPv6 (58) payload length: 176) fe80::ea9f:80ff:fe5d:3d6e > fe80::5054:ff:fe9a:e: [icmp6 sum ok] ICMP6, router advertisement, length 176
	hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
	  source link-address option (1), length 8 (1): e8:9f:80:5d:3d:6e
	  mtu option (5), length 8 (1):  1492
	  prefix info option (3), length 32 (4): 2a00:abcd:abcd:1405::/64, Flags [onlink], valid time 1800s, pref. time 43200s
	  prefix info option (3), length 32 (4): fddc:f797:78ef:5::/64, Flags [onlink], valid time 1800s, pref. time 43200s
	  route info option (24), length 24 (3):  2a00:abcd:abcd:1400::/56, pref=medium, lifetime=1800s
	  route info option (24), length 24 (3):  fddc:f797:78ef::/48, pref=medium, lifetime=1800s
	  rdnss option (25), length 24 (3):  lifetime 1800s, addr: fddc:f797:78ef:5::1
	  advertisement interval option (7), length 8 (1):  600000ms

The preferred life time has to be always equal or less than the valid life time and the documented behaviour of ra_useleasetime is not honored, so this looks like a bug.

@dave14305
Copy link

Try setting preferred_lifetime to match leasetime.

@jorti
Copy link
Author

jorti commented Sep 24, 2022

Try setting preferred_lifetime to match leasetime.

That worked. Thanks.

However, the documented behaviour of ra_useleasetime says:

If set, the configured DHCPv4 leasetime is also used as limit and preferred lifetime of the IPv6 prefix. 

So either the documentation has to be updated or ra_useleasetime should also set the preferred lifetime.

@dave14305
Copy link

There was some discussion of the behavior inconsistencies here in the commit:

openwrt/odhcpd@3bda900

fengmushu pushed a commit to fengmushu/openwrt that referenced this issue Nov 18, 2023
…#10804)

Make use of the definitions from trusted-firmware-a.mk to build the
Trusted firmware arm. This fixes the build with binutils 2.39.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants