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

default RA lifetime and hoplimit not set in route #428

Open
ColinMcInnes opened this issue Jan 6, 2025 · 4 comments
Open

default RA lifetime and hoplimit not set in route #428

ColinMcInnes opened this issue Jan 6, 2025 · 4 comments

Comments

@ColinMcInnes
Copy link
Contributor

ColinMcInnes commented Jan 6, 2025

the default route is being sent by the router via RA, and they are setting a lifetime of 1800s and a hop limit of 64. However this is not showing up in the ip -6 route show.

$ ip -6 route show ::/0
default via fe80::2efa:a2ff:fe90:e275 dev eth0 proto ra metric 1002 pref medium

$ dhcpcd -U eth0
reason=ROUTERADVERT
interface=eth0
protocol=ra
nd1_from=fe80::2efa:a2ff:fe90:e275
nd1_acquired=1100
nd1_now=1152
nd1_hoplimit=64
nd1_flags=M
nd1_lifetime=1800
nd1_source_address=2cfaa290e275
nd1_prefix_information1_length=64
nd1_prefix_information1_flags=L
nd1_prefix_information1_vltime=2592000
nd1_prefix_information1_pltime=604800
nd1_prefix_information1_prefix=2001:192:168:228::

dhcpcd 10.1.0 linux

here's what it looks like if I use ISC's dhclient 4.4.3

default via fe80::2efa:a2ff:fe90:e275 dev eth0 proto ra metric 1024 expires 1609sec hoplimit 64 pref medium

Any ideas where to start looking?

@ColinMcInnes
Copy link
Contributor Author

Found it, in if-linux and ipv6. I'll create a patch to send it to netlink.

ColinMcInnes added a commit to ColinMcInnes/dhcpcd that referenced this issue Jan 8, 2025
Sends route lifetime to NETLINK RTA_EXPIRES

Partially addresses NetworkConfiguration#428
@rsmarples
Copy link
Member

ISC dhclient doesn't set any routes, just addresses.
Something Else (TM) must be setting the routes :)

dhcpcd will expire the routes anyway, so any fix we do is purely cosmetic (unless of course dhcpcd has stopped for whatever reason)

@ColinMcInnes
Copy link
Contributor Author

dhcpcd will expire the routes anyway, so any fix we do is purely cosmetic (unless of course dhcpcd has stopped for whatever reason)

Yes, I agree it's purely cosmetic. I have some other code that reports the current route lifetime from nl, so this is why I'm adding it for informational purposes.

ISC dhclient doesn't set any routes, just addresses. Something Else (TM) must be setting the routes :)

I found that out once I started looking deeper. :)

@rsmarples
Copy link
Member

If it helps, hop limit is defined here in the kernel: https://elixir.bootlin.com/linux/v6.12.6/source/include/uapi/linux/rtnetlink.h#L485

So it's a property of RTA_METRICS. Good luck!

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

No branches or pull requests

2 participants