bgpd: divorce router-id logic from CLI & zebra
Logic for determining the router-id was spread out over bgp_zebra.c and
bgp_vty.c. Move to bgpd/bgpd.c and have these two call more properly
encapsulated functions.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 4066a9a..85380f0 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -53,8 +53,6 @@
vrf_id_t vrf_id)
{
struct prefix router_id;
- struct listnode *node, *nnode;
- struct bgp *bgp;
zebra_router_id_update_read(zclient->ibuf,&router_id);
@@ -67,12 +65,7 @@
router_id_zebra = router_id.u.prefix4;
- for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
- {
- if (!bgp->router_id_static.s_addr)
- bgp_router_id_set (bgp, &router_id.u.prefix4);
- }
-
+ bgp_router_id_zebra_bump ();
return 0;
}