Index: bgpd/bgp_aspath.c =================================================================== --- bgpd/bgp_aspath.c (.../tags/as4-patch07) (revision 9879) +++ bgpd/bgp_aspath.c (.../branches/as32) (revision 9879) @@ -1477,6 +1477,7 @@ if ( prevseg ) prevseg->next = NULL; + if (startseg == seg) startseg = NULL; assegment_free( seg ); /* that one is NULL-resistent */ /* We have the startseg, and have to put that in front of @@ -1484,14 +1485,16 @@ * Maybe this could be done easier, but this * way it works without leaving holes */ - newfront = aspath_new(); - newfront->segments = startseg; - newlybuild = aspath_dup(*as4_path); - aspath_merge( newfront, newlybuild ); - aspath_free(newfront); + if (startseg != NULL) { + newfront = aspath_new(); + newfront->segments = startseg; + aspath_merge( newfront, newlybuild ); + aspath_free(newfront); + } + aspath_unintern(*aspath); aspath_unintern(*as4_path); *as4_path = NULL; Index: bgpd/ChangeLog =================================================================== --- bgpd/ChangeLog (.../tags/as4-patch07) (revision 9879) +++ bgpd/ChangeLog (.../branches/as32) (revision 9879) @@ -1,3 +1,9 @@ +2007-07-05 Juergen Kammer + * bgp_aspath.c : fix bug reported by Katsuyasu Toyama using + solution from his colleague Arifumi - an AS4 quagga will dump + core when using iBGP to an AS2 speaker when the AS has + an eBGP connection to a true AS4 at an AS2 speaker. + 2007-05-14 Juergen Kammer * bgp_attr.c : change the order in which attributes are send to the correct 'ascending' order, i.e. move sending the AS4_*