diff options
Diffstat (limited to 'main/quagga/bgpd-route-selection-crash.patch')
-rw-r--r-- | main/quagga/bgpd-route-selection-crash.patch | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/main/quagga/bgpd-route-selection-crash.patch b/main/quagga/bgpd-route-selection-crash.patch index 3f1797395e..473e4e564b 100644 --- a/main/quagga/bgpd-route-selection-crash.patch +++ b/main/quagga/bgpd-route-selection-crash.patch @@ -1,16 +1,16 @@ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c -index 34ba1ab..ad8642e 100644 +index 34ba1ab..7ade22f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c -@@ -348,9 +348,9 @@ bgp_info_cmp (struct bgp *bgp, struct bgp_info *new, struct bgp_info *exist, - *paths_eq = 0; - - /* 0. Null check. */ -- if (new == NULL) -+ if (new == NULL || new->peer->su_remote == NULL) +@@ -553,6 +553,11 @@ bgp_info_cmp (struct bgp *bgp, struct bgp_info *new, struct bgp_info *exist, return 0; -- if (exist == NULL) -+ if (exist == NULL || exist->peer->su_remote == NULL) - return 1; - newattr = new->attr; + /* 13. Neighbor address comparision. */ ++ if (new->peer->su_remote == NULL) ++ return 0; ++ if (exist->peer->su_remote == NULL) ++ return 1; ++ + ret = sockunion_cmp (new->peer->su_remote, exist->peer->su_remote); + + if (ret == 1) |