bird and on-interface p2p routes
Eugene M. Zheganin
emz at norma.perm.ru
Wed Jan 10 17:36:02 CET 2024
Hello,
youm this question was asked like a gazillion times, but so far I faled
to google the answer. So, I have a network softrouter on Linux which was
clearly written by some ignorant folks; it operates the p2p tunX
interface that doesn't have the remote IP set, only a local one. So bird
does complain about "strange next-hop" when walking through the kernel
routing table and seeing the local/self address as a gateway. Still,
this is partially valid setup, because the hosts this softrouter injects
into the kernel RT are reachable via p2p interface directly. I can
declare these as a static routes reachable via tunX, but this setup
lacks the automation (I will had to refresh thhe routes manually).
So, my though is like this: is it possible to convert these from
"strange next-hop" routes to this
===Cut===
10.24.123.0/21 unicast [direct1 2023-12-07] * (200)
dev tun0
===Cut===
via the export filter ? I tried the following approach but it seems like
I'm missing something:
===Cut===
filter exportkernelv4 {
if ifname = "tun0" then {
print "attempting to change route attributes: ifname ",
ifname, ", gw: ", gw, ", dest: ", dest;
onlink = true;
#unset(gw);
}
accept;
};
protocol kernel {
learn;
persist;
scan time 20;
ipv4 {
import all;
export filter exportkernelv4;
};
}
===Cut===
What am I missing ? Seems like for some reason I just cannot merey
unsert the gw attribute.
Thanks.
Eugene.
More information about the Bird-users
mailing list