]> git.ipfire.org Git - thirdparty/bird.git/commit
Netlink: Enable strict checking for KRT dumps
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 14 Jan 2022 20:53:40 +0000 (21:53 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 14 Jan 2022 20:53:40 +0000 (21:53 +0100)
commite818f16448e918ed07633480291283f3449dd9e4
tree9622a0138cf8bef4c04e8d7b08a9a64f17ea15fd
parentd0dd1d20cd40e75e417d58569fac3ff0bf1db41a
Netlink: Enable strict checking for KRT dumps

Add strict checking for netlink KRT dumps to avoid PMTU cache records
from FNHE table dump along with KRT.

Linux Kernel added FNHE table dump to the netlink API in patch:

https://patchwork.ozlabs.org/project/netdev/patch/8d3b68cd37fb5fddc470904cdd6793fcf480c6c1.1561131177.git.sbrivio@redhat.com/

Therefore, since Linux 5.3 these route cache entries are dumped together
with regular routes during periodic KRT scans, which in some cases may be
huge amount of useless data. This can be avoided by using strict checking
for netlink dumps:

https://lore.kernel.org/netdev/20181008031644.15989-1-dsahern@kernel.org/

The patch mitigates the risk of receiving unknown and potentially large
number of FNHE records that would block BIRD I/O in each sync. There is a
known issue caused by the GRE tunnels on Linux that seems to be creating
one FNHE record for each destination IP address that is routed through
the tunnel, even when the PMTU equals to GRE interface MTU.

Thanks to Tomas Hlavacek for the original patch.
sysdep/linux/netlink.c