From 6b74db7544b3570ea7e2a5c0608755702cdce394 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Thu, 4 Nov 2021 19:00:35 -0700 Subject: [PATCH 1/2] pimd: handle vxlan sg add/del for upstream entries that are in a reg-join state pim-vxlan uses periodic null registers to bootstrap a new (VTEP, mcast-grp). These null registers were not being sent if the (S, G) was already present and in a register-join state. Ticket: #2848079 Signed-off-by: Anuradha Karuppiah --- pimd/pim_vxlan.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c index 5d5ea1bfe6..22b14eecf9 100644 --- a/pimd/pim_vxlan.c +++ b/pimd/pim_vxlan.c @@ -390,9 +390,23 @@ static void pim_vxlan_orig_mr_up_add(struct pim_vxlan_sg *vxlan_sg) pim_upstream_keep_alive_timer_start(up, vxlan_sg->pim->keep_alive_time); /* register the source with the RP */ - if (up->reg_state == PIM_REG_NOINFO) { + switch (up->reg_state) { + + case PIM_REG_NOINFO: pim_register_join(up); pim_null_register_send(up); + break; + + case PIM_REG_JOIN: + /* if the pim upstream entry is already in reg-join state + * send null_register right away and add to the register + * worklist + */ + pim_null_register_send(up); + pim_vxlan_update_sg_reg_state(pim, up, true); + break; + + default:; } /* update the inherited OIL */ From 7f5faf7c765e9ddc0a9c9344be23b9134ddb45ca Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Dec 2021 07:58:47 -0500 Subject: [PATCH 2/2] pimd: Clean up switch statement to our standards Fixup the switch statement to not have a default statement with a enum as the case. Signed-off-by: Donald Sharp --- pimd/pim_vxlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c index 22b14eecf9..4bed52a584 100644 --- a/pimd/pim_vxlan.c +++ b/pimd/pim_vxlan.c @@ -406,7 +406,9 @@ static void pim_vxlan_orig_mr_up_add(struct pim_vxlan_sg *vxlan_sg) pim_vxlan_update_sg_reg_state(pim, up, true); break; - default:; + case PIM_REG_JOIN_PENDING: + case PIM_REG_PRUNE: + break; } /* update the inherited OIL */