frr icon indicating copy to clipboard operation
frr copied to clipboard

zebra: fix neighbor table name length

Open kunkku opened this issue 6 months ago • 2 comments

Toggling user-space neighbor discovery for IPv6 did not work because the table name was not fully copied to the Netlink message.

kunkku avatar May 22 '25 18:05 kunkku

can I get an example of what is actually broken here? I'm a bit cornfused.

donaldsharp avatar May 23 '25 13:05 donaldsharp

The issue here is that the length of the NDTA_NAME attribute is hard-coded to 10, whereas the correct length of ndisc_cache is 11. This results in the trailing e not being copied to the Netlink message. Consequently, nhrpd will not get notified when the kernel attempts to perform neighbor solicitation on the target interface.

The correct length of arp_cache is 9, but as the constant string is null-terminated and the field in the Netlink message is anyway padded with null bytes to the length of 12, this error has no effect on IPv4.

kunkku avatar May 28 '25 09:05 kunkku

can I get an example of what is actually broken here? I'm a bit cornfused.

We're copying the string "ndisc_cache" with a length of 10. That string is 11 characters :laughing:

eqvinox avatar Jul 08 '25 15:07 eqvinox

@Mergifyio backport stable/10.4 stable/10.3 stable/10.2

ton31337 avatar Oct 07 '25 14:10 ton31337

backport stable/10.4 stable/10.3 stable/10.2

✅ Backports have been created

mergify[bot] avatar Oct 07 '25 14:10 mergify[bot]

@Mergifyio backport dev/10.5

mjstapp avatar Oct 09 '25 13:10 mjstapp

backport dev/10.5

✅ Backports have been created

mergify[bot] avatar Oct 09 '25 13:10 mergify[bot]

@eqvinox @ton31337 any remaining questions? can you approve so we can merge this?

mjstapp avatar Oct 09 '25 15:10 mjstapp

nothing from my side

ton31337 avatar Oct 09 '25 15:10 ton31337

nothing from my side

how about ... approving it then? I think the rest of us don't want to merge when it appears you still have questions?

mjstapp avatar Oct 09 '25 18:10 mjstapp

@margifyio backport dev/10.5

donaldsharp avatar Oct 12 '25 18:10 donaldsharp