[Bug 1862481] Re: Cannot set accept-ra to 2, it keeps reseting it to 0
** Tags added: docs documentation -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1862481 Title: Cannot set accept-ra to 2, it keeps reseting it to 0 To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1862481/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1862481] Re: Cannot set accept-ra to 2, it keeps reseting it to 0
I was looking at this bug while working on another accept-ra related thing and found this: As far as I can tell, networkd will always set the per-interface accept_ra parameter to 0: https://github.com/systemd/systemd/blob/v255/src/network/networkd- sysctl.c#L146 The explanation for that is documented in an old version of this code (which was moved from networkd-link.c to networkd-sysctl.c): https://github.com/systemd/systemd/blob/v241/src/network/networkd- link.c#L2609 It's also described in different words on systemd.network(5): Note that kernel's implementation of the IPv6 RA protocol is always disabled, regardless of this setting. If this option is enabled, a userspace implementation of the IPv6 RA protocol is used, and the kernel's own implementation remains disabled... The Netplan documentation need to be updated. It currently says "If unset use the host kernel default setting" but, at least when networkd is used, the "default" will always be disabled because networkd itself will force it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1862481 Title: Cannot set accept-ra to 2, it keeps reseting it to 0 To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1862481/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1862481] Re: Cannot set accept-ra to 2, it keeps reseting it to 0
I ran into this today and after a lot of head-scratching, it just occurred to me that this is probably the expected behavior. systemd- network(5)'s IPv6AcceptRA section says (https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html): > Note that kernel's implementation of the IPv6 RA protocol is always disabled, regardless of this setting. Then I read this comment: https://unix.stackexchange.com/questions/759771/ubuntu-accept-ra-is-not- effective-with-sysctl-and-prevents-dhcp6-when-in- netplan#comment1448644_759791, quoted below: > It's for the in-kernel RA handler. Traditionally Linux has done IPv6 autoconfig (though not DHCPv6) without any userspace software at all, but its capabilities are limited. (Networkd actually sets it to 0 even if IPv6AcceptRA=true.) What possibly confused the readers (including me) was, systemd- network(5) does say: > Also see IP Sysctl in the kernel documentation regarding "accept_ra", but note that systemd's setting of 1 (i.e. true) corresponds to kernel's setting of 2. At the beginning, this paragraph made me think systemd-networkd sets `accept_ra` to 2 when `IPv6AcceptRA=yes`. But, no. Now I realized systemd-network(5) was merely using the kernel document to explain that `IPv6AcceptRA=yes`'s behavior is the same as `accept_ra=2`'s behavior (i.e, accepting RA messages even if forwarding is enabled), but systemd- networkd always sets `accept_ra=0` duo the the explanation of "Note that kernel's implementation of the IPv6 RA protocol is always disabled". -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1862481 Title: Cannot set accept-ra to 2, it keeps reseting it to 0 To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1862481/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs