[quagga-dev 16282] [PATCH v2 10/10] bgpd: avoid looping when unselecting a list of mpath entries

Philippe Guibert philippe.guibert at 6wind.com
Wed Oct 12 14:42:59 BST 2016


sometimes, when electing best route algorithm, a static route
may be injected, thus causing all old multipath entries to be
removed from multipath list. As a loop is removing each mpath
entry from mpath list, it is necessary to update the pointer.

Signed-off-by: Philippe Guibert <philippe.guibert at 6wind.com>
---
 bgpd/bgp_mpath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
index 46d813984741..b47cdad95909 100644
--- a/bgpd/bgp_mpath.c
+++ b/bgpd/bgp_mpath.c
@@ -615,6 +615,7 @@ bgp_info_mpath_update (struct bgp_node *rn, struct bgp_info *new_best,
                           sockunion2str (cur_mpath->peer->su_remote,
                                          nh_buf[1], sizeof (nh_buf[1])));
             }
+          mp_node = mp_next_node;
           cur_mpath = next_mpath;
         }
       else
-- 
2.1.4





More information about the Quagga-dev mailing list