I've got my script going, but I can't get the resulting routes into Bird. I add the routes to a new kernel table which I point a "protocol kernel" block at (see below). The routes I'm adding don't go via a particular interface as OpenSWAN doesn't create any interfaces - I'm just putting them in as "target network" via "local ip address" (this might be one problem - I've tried both the internal IP and the GRE tunnel endpoint).
When I start Bird up I receive warnings about my new route with a strange next-hop address. It then seems to completely ignore the route as "birdc" produces no output when I do a "show route".
Do I need to specify my local IPSEC policies in a different format, or am I missing something in the configuration?
log syslog all;
debug protocols all;
protocol kernel {
learn;
persist;
scan time 10;
import all;
export none;
kernel table 1; # This is my new table populated with IPSEC policies
}
protocol device {
scan time 10;
}
protocol ospf myOSPF {
import all;
export all;
area 0 {
interface "tunOtherRouter" { # This is the GRE tunnel
cost 5;
type ptp;
hello 5; retransmit 2; wait 10; dead 20;
};
};
}