diff options
| author | paul <paul> | 2005-11-23 02:47:02 +0000 | 
|---|---|---|
| committer | paul <paul> | 2005-11-23 02:47:02 +0000 | 
| commit | ad72740e884f16c1f30a99168428fdd15fadaa68 (patch) | |
| tree | 79126f6d960dd8ab96043203d728edfdc04f67a1 /bgpd | |
| parent | c24d602e82d31a2fcbccb4cc3b66f8d0a79d5f22 (diff) | |
[bgp] Fix SEGV if empty path is confed-compared ([quagga-users 5968])
2005-11-23 Paul Jakma <paul.jakma@sun.com>
	* bgp_aspath.c: (assegments_parse) should be static
2005-11-23 Juergen Kammer <j.kammer@eurodata.de>
	* bgp_aspath.c: (aspath_cmp_left_confed) fix SEGV for case
	  where one or both paths are empty.
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/ChangeLog | 9 | ||||
| -rw-r--r-- | bgpd/bgp_aspath.c | 5 | 
2 files changed, 13 insertions, 1 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 68cb1176..59e70cfe 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,12 @@ +2005-11-23 Paul Jakma <paul.jakma@sun.com> + +	* bgp_aspath.c: (assegments_parse) should be static + +2005-11-23 Juergen Kammer <j.kammer@eurodata.de> + +	* bgp_aspath.c: (aspath_cmp_left_confed) fix SEGV for case +	  where one or both paths are empty. +  2005-11-14 Paul Jakma <paul.jakma@sun.com>  	* bgp_route.c: (bgp_process_rsclient) convert to new workqueue 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;  | 
