Summary: | net-misc/frr and sys-apps/iproute2 rt_protos mismatch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jaco Kroon <jaco> |
Component: | Current packages | Assignee: | Jaco Kroon <jaco> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | alarig, base-system, jaco, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jaco Kroon
2024-10-10 09:31:44 UTC
Quick thought, Isn’t proto 4 supposed to be used for routes added with `ip route add $foo via $bar`? With static routes inside frr, that not actually a kernel static route, but a zebra static route. So for me, we should re-use that zstatic keyword instead of just static. Would appreciate input from base-system team as well as to their preference, thereafter you're most welcome to drop the CC, happy to handle and push relevant PRs as directed (obviously easier if fix is only in one package rather than two). I'm currently thinking: Patch frr to: 1. Include a separate .h file containing the RTPROT_* defines (.patch file). 2. Auto generate that file based on contents of /usr/share/iproute2/rt_protos (scripted). 3. Create a rt_protos.d/frr.conf for any values that's missing from iproute2. 2 and 3 will probably be a basic loop iterating either the original rt_netlink.h file, or frr's shipped rt_protos.d/frr.conf file ..., and dispatching into the rt_netlink_protos.h and rt_protos.d/frr.conf file as needed. This way frr should end up using proto 4 for static, and all the missing values just get added to rt_protos.d/frr.conf to be installed (marked /* missing */ above). The one thing here is that RTPROT_ZSTATIC vs static route - everything else is just a case difference. This is my challenge. (In reply to Alarig Le Lay from comment #1) > Quick thought, > > Isn’t proto 4 supposed to be used for routes added with `ip route add $foo > via $bar`? > With static routes inside frr, that not actually a kernel static route, but > a zebra static route. So for me, we should re-use that zstatic keyword > instead of just static. plastiekpoot [11:51:26] ~ # ip ro ad 10.0.0.0/24 via 192.168.42.1 plastiekpoot [11:51:38] ~ # ip ro sh 10.0.0.0/24 10.0.0.0/24 via 192.168.42.1 dev wlp2s0 So no, I don't think so. But yea, static vs zstatic could make sense, ie, we have frr still use 196, and we just add it as a zstatic proto for iproute2? |