IPv6 BFD interop with Huawei, checksum 0 UDP

Alexander Zubkov green at qrator.net
Sat Jun 22 19:44:34 CEST 2024


Hello,

Nobody has done it yet, so I've tried to implement it. The patch is
attached. Of course feel free to alter naming, wording, add credits
for the reported, etc. as you wish.

Ville, could you check that it works for you?

PS.
1) I also noticed there is "strict bind" example is missing in BFD
template config in the documentation.
2) What do you think about changing bfd flags and/or socket flags to
bit fields too, as it was done with other flags recently?

Regards,
Alexander


On Wed, Jun 12, 2024 at 3:14 PM Maria Matejka via Bird-users
<bird-users at network.cz> wrote:
>
> Hello!
>
> On Wed, Jun 12, 2024 at 06:32:10PM +0700, Ville O wrote:
>
> At least some Huawei devices use a checksum of 0 for all IPv6 BFD UDP packets after finishing Poll/Final. All packets sent with states other than Up or with flags other than C have the correct checksums.
>
> […]
>
> This issue could be worked around on the BIRD side at least on the Linux platform. RFC6936 allows [3] for hosts to enable accepting IPv6 UDP with a checksum of 0 and this is implemented in Linux kernels from 3.16 with sockopt “UDP_NO_CHECK6_RX”. I have tested that this indeed works: checksum 0 packets are received to AF_INET6, SOCK_DGRAM sockets when it is enabled.
>
> I wonder if it would be acceptable to enable this option on the IPv6 socket(s) used for BFD in BIRD, if supported by the platform?
>
> Patches welcome. It should be configurable and off by default. For more information on how to contribute, see the contributing guidelines:
>
> https://gitlab.nic.cz/labs/bird/-/blob/master/CONTRIBUTING.md
>
> Thank you for raising awareness about this issue.
>
> Maria
>
> – Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd-udp6-no-csum.patch
Type: application/x-patch
Size: 5852 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20240622/3ec4fa8c/attachment.bin>


More information about the Bird-users mailing list