1.1.3 segfaults on seeing certain routes

KORN Andras korn-birdusers at elan.rulez.org
Tue Sep 22 14:08:40 CEST 2009


On Tue, Sep 22, 2009 at 01:44:04PM +0200, Ondrej Zajicek wrote:

> > Background: I'm completely new to BIRD. I have five locations connected via
> > OpenVPN in a full mesh, using Linux 2.6 routers, and I thought I'd try
> > dynamic instead of static routing. At first I just wanted to see how/what
> > BIRD would do, so I set it to use kernel routing table 3 which I don't use
> > for policy routing. I copied the contents of my other routing tables into
> > table 3 and fired up bird, which promptly segfaulted.
> 
> Just a remark - it is usually better idea to use static section in bird.conf
> to configure static routes than to import alien routes from kernel. But both
> variants should work.

Maybe I'll switch to that when things appear to work; however, my intention
is for these routes to be created dynamically, automatically, based on OSPF.
They are static now because I'm not using dynamic routing at all.

I seeded bird with them because I wanted to see whether it would be safe to
run bird on the live tables (i.e. whether it wouldn't remove important
routes).

> > The following routes are sufficient (but maybe not all of them necessary) to
> > reproduce the segfault:
> > 
> > # ip ro sh table 3
> > 172.18.68.254 dev tap5  scope link  src 172.18.32.254 
> > 10.10.107.0/24 via 172.18.68.254 dev tap5  src 172.18.32.254 
> > 192.168.12.0/22 via 172.18.68.254 dev tap5  src 172.18.32.254 
> > 172.18.64.0/20 via 172.18.68.254 dev tap5  src 172.18.32.254 
> 
> Could you send me shell commands that sets these routes?

Sure. Just prepend 'ip ro add' and append 'table 3' to each line, like this:

ip ro add 172.18.68.254/32 dev tap5 scope link src 172.18.32.254 table 3
ip ro add 10.10.107.0/24 via 172.18.68.254 dev tap5 src 172.18.32.254 table 3
ip ro add 192.168.12.0/22 via 172.18.68.254 dev tap5 src 172.18.32.254 table 3
ip ro add 172.18.64.0/20 via 172.18.68.254 dev tap5 src 172.18.32.254 table 3

Of course, the interface must exist first; you can create it with tunctl or
openvpn --mktun --dev tap5. Then give it an address with e.g. ip addr add
dev tap5 172.18.32.254/32.

> It seems that problem is that BIRD does not properly import these routes
> (and does not consider 172.18.68.254 as a neighbor).

The first route declares it a neighbour...

> > Additionally, when running with an empty table 3 on one of the neighbours of
> > this router, it logged messages like:
> > 
> > 21-09-2009 12:55:08 <WARN> Received HELLO packet address (172.18.32.254) is inconsistent with the primary address of interface tap4.
> > 
> > It indeed is inconsistent, because all tap interfaces have the same address
> > on each router (specific to the router, with a /32 mask)
> 
> BIRD expects that interface uses either 'standard' network address, or address
> with /32 mask and specified peer address (configured with 'ip address add IP1
> peer IP2 dev DEV' or similarly using ifconfig and pointopoint). In both cases
> there should not be this warning as this warning means that Hello message was
> ignored.

OK, I will retry with this kind of peer setup, but I think I can't test
anything meaningfully while my routes cause a segfault.

> Is seems that you set up /32 peer routes in a different manner. Maybe we could
> extend BIRD to handle such configuration.

I would certainly see that as useful. :)

Andras

-- 
 Andras Korn <korn at elan.rulez.org> - <http://chardonnay.math.bme.hu/~korn/>
       Blessed are the young, for they shall inherit the national debt.



More information about the Bird-users mailing list