[quagga-dev 10934] Re: Assert in bgp_attr.c

David Lamparter equinox at opensourcerouting.org
Tue Dec 3 17:38:19 GMT 2013

On Fri, Nov 29, 2013 at 04:53:15PM +0100, Milan Kocian wrote:
> I get this assert when I try to add extended community on received routes which
> have ext attributes set. When received route has no ext community
> there is no problem with adding new ext. community.

Urgh.  I think I know what the problem is... and it's quite ugly

> 2013/11/29 16:27:57 BGP: Assertion `ret != ((void *)0)' failed in file
> bgp_attr.c, line 693, function bgp_attr_unintern

This is indicating that the attr could not be found in the caching-index
attrhash.  If I'm not completely mistaken, the reason for this is that
bgp_routemap.c:1559 just modifies the existing attr, without copying it
or rehashing.  This may sound innocent enough, but it actually means
that ALL routes that share this cached attr instance get the change
applied!  Meaning, we're causing other routes to have broken attributes.

I'll mail a patch for this in a bit,


More information about the Quagga-dev mailing list