[quagga-dev 4448] Re: bgpd crashes when a neighboring ospfd is stopped
paul at clubi.ie
Thu Oct 19 23:34:18 BST 2006
On Thu, 19 Oct 2006, Paul Jakma wrote:
> Can you reproduce? Can you get it to crash under gdb?
199 /* Ignore 'pcount' for RS-client tables */
200 if (rn->table->type != BGP_TABLE_MAIN
201 || ri->peer == ri->peer->bgp->peer_self)
When that second condition is (notionally) true, ri->peer is the
peer_self, for which we never initialise the 'bgp' pointer..
Yanek got it too, but we never managed to pin it down beyond "occurs
Attached simple fix cures the problem here and should fix things for
both of you I think.
Paul Jakma paul at clubi.ie paul at jakma.org Key ID: 64A2FF6A
Quod erat demonstrandum.
[Thus it is proven. For those who wondered WTF QED means.]
-------------- next part --------------
RCS file: /var/cvsroot/quagga/bgpd/bgpd.c,v
retrieving revision 1.35
diff -u -p -r1.35 bgpd.c
--- bgpd/bgpd.c 19 Sep 2006 18:51:53 -0000 1.35
+++ bgpd/bgpd.c 19 Oct 2006 22:33:39 -0000
@@ -1885,6 +1885,7 @@ bgp_create (as_t *as, const char *name)
bgp->peer_self = peer_new ();
bgp->peer_self->host = strdup ("Static announcement");
+ bgp->peer_self->bgp = bgp;
bgp->peer = list_new ();
bgp->peer->cmp = (int (*)(void *, void *)) peer_cmp;
More information about the Quagga-dev