Hello, I'm doing some experiments using radv and bird3. as expected it bird3 automatically sends prefix informations if not somehow disabled. when I dynamically add a prefix to an interface (ip a a address/64 dev eno1) it immediatly blasts out that prefix with the default parameters (hardcoded in radv.c as radv_prefix_config default_prefix). Now if that prefix is removed, this prefix is sent as valid_lifetime and preferred_lifetime = 0, but at least linux (NetworkManager) seems to ignore this deprecation, mainly because onlink and autonomous are not set. As soon as I modify the code to do that, the prefix gets deprecated (valid_lifetime gets lower-limited to 7200 on the os side, I think strictly rfc valid_lifetime should also count down on bird starting at 7200, but in practice 0 seems to work too). I've not tried all combinations, but the simplest fix for me is setting .onlink and .autonomous =1 in dead_prefix. I'm not sure if this does not break prefixes that are explicitly defined, so I did not modifiy dead_prefix but instead changed WALK_LIST_DELSAFE(pfx, next, ifa->prefixes) { if (pfx->valid && !pfx->mark) { RADV_TRACE(D_EVENTS, "Invalidating prefix %N on %s", &pfx->prefix, ifa->iface->name); pfx->valid = 0; pfx->changed = now; struct radv_prefix_config *pc = radv_prefix_match(ifa, &pfx->prefix); if(pc) pfx->cf = pc; else pfx-cv = &dead_prefix; } } and in packet.c funtion radv_prepare_prefix I changed if (!px->valid) { ifa->valid_time = MIN(ifa->valid_time, px->changed + ifa->cf->prefix_linger_time S); op->preferred_lifetime = 0; op->valid_lifetime = 0; // might need to be >7200s, see RFC4862 section 5.5.3 e } What do you think about this changes? Regards Michael
On Thu, Nov 20, 2025 at 01:18:06PM +0100, Michael Saxl via Bird-users wrote:
Hello,
I'm doing some experiments using radv and bird3. as expected it bird3 automatically sends prefix informations if not somehow disabled.
when I dynamically add a prefix to an interface (ip a a address/64 dev eno1) it immediatly blasts out that prefix with the default parameters (hardcoded in radv.c as radv_prefix_config default_prefix).
Now if that prefix is removed, this prefix is sent as valid_lifetime and preferred_lifetime = 0, but at least linux (NetworkManager) seems to ignore this deprecation, mainly because onlink and autonomous are not set.
Hello Yes, this seems to be a bug. RFC 4861 section 6.3.4 says: Prefix Information options that have the "on-link" (L) flag set indicate a prefix identifying a range of addresses that should be considered on-link. Note, however, that a Prefix Information option with the on-link flag set to zero conveys no information concerning on-link determination and MUST NOT be interpreted to mean that addresses covered by the prefix are off-link. The only way to cancel a previous on-link indication is to advertise that prefix with the L-bit set and the Lifetime set to zero. While RFC 4862 section 4 says: One Prefix Information option field, the "autonomous address-configuration flag", indicates whether or not the option even applies to stateless autoconfiguration. and section 5.5.3 says: a) If the Autonomous flag is not set, silently ignore the Prefix Information option. That seems like a solid case that prefix withdraw should use the same combination of flags like previous announcement. Will check it. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
On Thu, Nov 20, 2025 at 01:18:06PM +0100, Michael Saxl via Bird-users wrote:
Hello,
I'm doing some experiments using radv and bird3. as expected it bird3 automatically sends prefix informations if not somehow disabled. ... I've not tried all combinations, but the simplest fix for me is setting .onlink and .autonomous =1 in dead_prefix. I'm not sure if this does not break prefixes that are explicitly defined, so I did not modifiy dead_prefix but instead changed
What do you think about this changes?
Hello Your change worked for a case when a prefix was removed from the interface, but not for a case when a prefix was de-configured in the BIRD config. I fixed is by keeping active value of flags in the prefix structure itself: https://gitlab.nic.cz/labs/bird/-/commit/324f4532ef90a66b4d1221ddccf790573cc... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
Am Donnerstag, 27. November 2025, 18:24:31 Mitteleuropäische Normalzeit schrieb Ondrej Zajicek:
On Thu, Nov 20, 2025 at 01:18:06PM +0100, Michael Saxl via Bird-users wrote:
Hello,
I'm doing some experiments using radv and bird3. as expected it bird3 automatically sends prefix informations if not somehow disabled. ... I've not tried all combinations, but the simplest fix for me is setting .onlink and .autonomous =1 in dead_prefix. I'm not sure if this does not break prefixes that are explicitly defined, so I did not modifiy dead_prefix but instead changed
What do you think about this changes?
Hello
Your change worked for a case when a prefix was removed from the interface, but not for a case when a prefix was de-configured in the BIRD config.
I fixed is by keeping active value of flags in the prefix structure itself:
https://gitlab.nic.cz/labs/bird/-/commit/324f4532ef90a66b4d1221ddccf790573cc fc623
Hello, I can confirm that the commit in the master branch of bird works (I backported it to my local debian package, the difference between this one and my backport is the missing pd_preferred that does not yet exist in 3.1.0) Thanks for the quick fix.
participants (2)
-
Michael Saxl -
Ondrej Zajicek