diff options
| -rw-r--r-- | bgpd/bgpd.c | 3 | ||||
| -rw-r--r-- | lib/routemap.c | 7 | ||||
| -rw-r--r-- | pimd/pim_mlag.c | 31 | ||||
| -rw-r--r-- | pimd/pim_oil.c | 14 | ||||
| -rw-r--r-- | pimd/pim_upstream.h | 3 |
5 files changed, 45 insertions, 13 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index faee7dad4a..ec6e00ea34 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2511,6 +2511,9 @@ static void peer_group2peer_config_copy(struct peer_group *group, } } + /* Update GR flags for the peer. */ + bgp_peer_gr_flags_update(peer); + bgp_bfd_peer_group2peer_copy(conf, peer); } diff --git a/lib/routemap.c b/lib/routemap.c index 210512212d..3d69a3495a 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -2747,7 +2747,12 @@ static int route_map_dep_update(struct hash *dephash, const char *dep_name, memset(&tmp_dep_data, 0, sizeof(struct route_map_dep_data)); tmp_dep_data.rname = rname; dep_data = hash_lookup(dep->dep_rmap_hash, &tmp_dep_data); - dep_data->refcnt--; + + if (!dep_data) + goto out; + + if (dep_data->refcnt) + dep_data->refcnt--; if (!dep_data->refcnt) { ret_dep_data = hash_release(dep->dep_rmap_hash, diff --git a/pimd/pim_mlag.c b/pimd/pim_mlag.c index 78be914cee..02f206144f 100644 --- a/pimd/pim_mlag.c +++ b/pimd/pim_mlag.c @@ -721,14 +721,19 @@ static void pim_mlag_process_vxlan_update(struct mlag_vxlan *msg) static void pim_mlag_process_mroute_add(struct mlag_mroute_add msg) { if (PIM_DEBUG_MLAG) { + struct prefix_sg sg; + + sg.grp.s_addr = ntohl(msg.group_ip); + sg.src.s_addr = ntohl(msg.source_ip); + zlog_debug( - "%s: msg dump: vrf_name: %s, s.ip: 0x%x, g.ip: 0x%x cost: %u", - __func__, msg.vrf_name, msg.source_ip, - msg.group_ip, msg.cost_to_rp); + "%s: msg dump: vrf_name: %s, s.ip: 0x%x, g.ip: 0x%x (%pSG4) cost: %u", + __func__, msg.vrf_name, msg.source_ip, msg.group_ip, + &sg, msg.cost_to_rp); zlog_debug( - "owner_id: %d, DR: %d, Dual active: %d, vrf_id: 0x%x intf_name: %s", - msg.owner_id, msg.am_i_dr, msg.am_i_dual_active, - msg.vrf_id, msg.intf_name); + "(%pSG4)owner_id: %d, DR: %d, Dual active: %d, vrf_id: 0x%x intf_name: %s", + &sg, msg.owner_id, msg.am_i_dr, msg.am_i_dual_active, + msg.vrf_id, msg.intf_name); } if (!(router->mlag_flags & PIM_MLAGF_LOCAL_CONN_UP)) { @@ -746,12 +751,16 @@ static void pim_mlag_process_mroute_add(struct mlag_mroute_add msg) static void pim_mlag_process_mroute_del(struct mlag_mroute_del msg) { if (PIM_DEBUG_MLAG) { + struct prefix_sg sg; + + sg.grp.s_addr = ntohl(msg.group_ip); + sg.src.s_addr = ntohl(msg.source_ip); zlog_debug( - "%s: msg dump: vrf_name: %s, s.ip: 0x%x, g.ip: 0x%x ", - __func__, msg.vrf_name, msg.source_ip, - msg.group_ip); - zlog_debug("owner_id: %d, vrf_id: 0x%x intf_name: %s", - msg.owner_id, msg.vrf_id, msg.intf_name); + "%s: msg dump: vrf_name: %s, s.ip: 0x%x, g.ip: 0x%x(%pSG4)", + __func__, msg.vrf_name, msg.source_ip, msg.group_ip, + &sg); + zlog_debug("(%pSG4)owner_id: %d, vrf_id: 0x%x intf_name: %s", + &sg, msg.owner_id, msg.vrf_id, msg.intf_name); } if (!(router->mlag_flags & PIM_MLAGF_LOCAL_CONN_UP)) { diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index 21febcc969..3ec0720fc4 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -375,6 +375,20 @@ static bool pim_channel_eval_oif_mute(struct channel_oil *c_oil, return do_mute; } + if (PIM_I_am_DualActive(pim_ifp)) { + struct pim_upstream *starup = c_oil->up->parent; + if (PIM_UPSTREAM_FLAG_TEST_MLAG_INTERFACE(c_oil->up->flags) + && (PIM_UPSTREAM_FLAG_TEST_MLAG_NON_DF(c_oil->up->flags))) + do_mute = true; + + /* In case entry is (S,G), Negotiation happens at (*.G) */ + if (starup + + && PIM_UPSTREAM_FLAG_TEST_MLAG_INTERFACE(starup->flags) + && (PIM_UPSTREAM_FLAG_TEST_MLAG_NON_DF(starup->flags))) + do_mute = true; + return do_mute; + } return do_mute; } diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index b3379c67b2..8030835fb2 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -286,7 +286,8 @@ static inline bool pim_up_mlag_is_local(struct pim_upstream *up) /* XXX: extend this to also return true if the channel-oil has * any AA devices */ - return (up->flags & PIM_UPSTREAM_FLAG_MASK_MLAG_VXLAN); + return (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_VXLAN + | PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE)); } struct pim_upstream *pim_upstream_find(struct pim_instance *pim, |
