summaryrefslogtreecommitdiff
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 7f85ea10..9ff1205c 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -596,7 +596,7 @@ aspath_hash_alloc (void *arg)
}
/* parse as-segment byte stream in struct assegment */
-struct assegment *
+static struct assegment *
assegments_parse (struct stream *s, size_t length)
{
struct assegment_header segh;
@@ -1155,6 +1155,9 @@ aspath_cmp_left_confed (struct aspath *aspath1, struct aspath *aspath2)
if (! (aspath1 && aspath2) )
return 0;
+ if ( !(aspath1->segments && aspath2->segments) )
+ return 0;
+
if ( (aspath1->segments->type != AS_CONFED_SEQUENCE)
|| (aspath2->segments->type != AS_CONFED_SEQUENCE) )
return 0;