nl_allow_replace check for primary key
Alexander Zubkov
green at qrator.net
Sun Jun 16 11:56:13 CEST 2024
Hi all,
I've noticed this patch:
https://gitlab.nic.cz/labs/bird/-/commit/00b139bd25c77b401d2065283cb970d9d8c1aa02
It says that "(net, metric) is the primary key". But for my
understanding the primary key in linux routing table also includes
tos. It seems that BIRD currently does not support routes with tos, so
it is not relevant now. But anyway the statement in code misses it,
and this rifle might shoot in the future if tos support is added.
Here is an example showing that tos is treated as a part of the primary key:
# ip route add 192.168.2.0/24 via 192.168.0.2 metric 10 tos 0x10
# ip route add 192.168.2.0/24 via 192.168.0.3 metric 10 tos 0x20
# ip -N route show 192.168.2.0/24
192.168.2.0/24 tos 0x20 via 192.168.0.3 dev eth0 metric 10
192.168.2.0/24 tos 0x10 via 192.168.0.2 dev eth0 metric 10
# ip ro replace 192.168.2.0/24 via 192.168.0.4 metric 10
# ip -N route show 192.168.2.0/24
192.168.2.0/24 tos 0x20 via 192.168.0.3 dev eth0 metric 10
192.168.2.0/24 tos 0x10 via 192.168.0.2 dev eth0 metric 10
192.168.2.0/24 via 192.168.0.4 dev eth0 metric 10
# ip ro replace 192.168.2.0/24 via 192.168.0.5 metric 10 tos 0x10
# ip -N route show 192.168.2.0/24
192.168.2.0/24 tos 0x20 via 192.168.0.3 dev eth0 metric 10
192.168.2.0/24 tos 0x10 via 192.168.0.5 dev eth0 metric 10
192.168.2.0/24 via 192.168.0.4 dev eth0 metric 10
Regards,
Alexander
More information about the Bird-users
mailing list