Route attributes overwritten during reconfiguration

Ondrej Zajicek santiago at crfreenet.org
Fri Feb 17 22:00:05 CET 2017


On Fri, Feb 17, 2017 at 09:20:45PM +0100, Ondrej Zajicek wrote:
> On Fri, Feb 17, 2017 at 09:57:41PM +0200, Lennert Buytenhek wrote:
> > On Fri, Feb 17, 2017 at 02:22:11PM +0100, Ondrej Zajicek wrote:
> > > > I think that the reconfiguration code finds the old and the new implicit
> > > > filter expression to be the same code, and therefore hangs onto the old
> > > > version, but then the underlying memory for some of the old objects gets
> > > > freed.  Or something like that.
> > > 
> > > Well, the comparison in static_same_rte() is just for decision whether
> > > the route should be propagated again to the (main) routing table.
> > > 
> > > Internal structures of static protocols (like struct static_route) are
> > > replaced anyways.
> > 
> > I see.  Well, I was hoping to avoid going too deeply into bird internals
> > (I've already been labeled our resident ornithologist), but I can dig
> > deeper if the problem doesn't reproduce on your end for some reason.
> 
> I could not reproduce the crash, but i can reproduce the valgrind warnings.
> I will check it.

Hi

Here is the bugfix. The bug was caused by some arcane rewriting behavior
in i_same() that works when called with argument order (new, old),
but static protocol called it as (old, new).

Note that the bug is specific to using functions in static routes.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-functions-static.patch
Type: text/x-diff
Size: 515 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170217/2c42b708/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170217/2c42b708/attachment.asc>


More information about the Bird-users mailing list