]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
BSD: Fix netmask family and length for incoming route msgs
authorRoy Marples <roy@marples.name>
Tue, 18 Feb 2025 09:48:19 +0000 (09:48 +0000)
committerRoy Marples <roy@marples.name>
Tue, 18 Feb 2025 09:48:19 +0000 (09:48 +0000)
commitf608e853a195bdeac6c7fb1a22d3b10fcfd5d01d
treeed32f849f9ee61ef19dc84eed845b1bd5365c524
parentab2d7cdfa4bf8c0f4e11a687e48f871879cdfbd3
BSD: Fix netmask family and length for incoming route msgs

Netmask family and length are ignored by traditional
userland tools such as route and netstat and are assumed
to match the destination sockaddr.
This is fortunate because BSD kernels use a radix tree
to store routes which adjusts the netmask at the point
of insertion where this information is lost.
We can just sub in the values from the destination address.

This is currently true for all BSD kernels.
src/if-bsd.c
src/sa.c