Merge pull request #11479 from AbhishekNR/gm_enable

pim6d: Changing igmp_enable to gm_enable.
This commit is contained in:
Donald Sharp 2022-06-28 07:30:32 -04:00 committed by GitHub
commit 20e8450396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -155,7 +155,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
pim_ifp->pim_enable = pim; pim_ifp->pim_enable = pim;
pim_ifp->pim_passive_enable = false; pim_ifp->pim_passive_enable = false;
#if PIM_IPV == 4 #if PIM_IPV == 4
pim_ifp->igmp_enable = igmp; pim_ifp->gm_enable = igmp;
#endif #endif
pim_ifp->gm_join_list = NULL; pim_ifp->gm_join_list = NULL;
@ -542,7 +542,7 @@ void pim_if_addr_add(struct connected *ifc)
#if PIM_IPV == 4 #if PIM_IPV == 4
struct in_addr ifaddr = ifc->address->u.prefix4; struct in_addr ifaddr = ifc->address->u.prefix4;
if (pim_ifp->igmp_enable) { if (pim_ifp->gm_enable) {
struct gm_sock *igmp; struct gm_sock *igmp;
/* lookup IGMP socket */ /* lookup IGMP socket */

View File

@ -75,7 +75,7 @@ struct pim_interface {
bool pim_can_disable_join_suppression : 1; bool pim_can_disable_join_suppression : 1;
bool pim_passive_enable : 1; bool pim_passive_enable : 1;
bool igmp_enable : 1; bool gm_enable : 1;
ifindex_t mroute_vif_index; ifindex_t mroute_vif_index;
struct pim_instance *pim; struct pim_instance *pim;

View File

@ -64,7 +64,7 @@ static void pim_if_membership_clear(struct interface *ifp)
pim_ifp = ifp->info; pim_ifp = ifp->info;
assert(pim_ifp); assert(pim_ifp);
if (pim_ifp->pim_enable && pim_ifp->igmp_enable) { if (pim_ifp->pim_enable && pim_ifp->gm_enable) {
return; return;
} }
@ -92,7 +92,7 @@ static void pim_if_membership_refresh(struct interface *ifp)
if (!pim_ifp->pim_enable) if (!pim_ifp->pim_enable)
return; return;
if (!pim_ifp->igmp_enable) if (!pim_ifp->gm_enable)
return; return;
/* /*
@ -169,7 +169,7 @@ static int pim_cmd_interface_delete(struct interface *ifp)
*/ */
pim_sock_delete(ifp, "pim unconfigured on interface"); pim_sock_delete(ifp, "pim unconfigured on interface");
if (!pim_ifp->igmp_enable) { if (!pim_ifp->gm_enable) {
pim_if_addr_del_all(ifp); pim_if_addr_del_all(ifp);
pim_if_delete(ifp); pim_if_delete(ifp);
} }
@ -360,8 +360,8 @@ static int pim_cmd_igmp_start(struct interface *ifp)
pim_ifp = pim_if_new(ifp, true, false, false, false); pim_ifp = pim_if_new(ifp, true, false, false, false);
need_startup = 1; need_startup = 1;
} else { } else {
if (!pim_ifp->igmp_enable) { if (!pim_ifp->gm_enable) {
pim_ifp->igmp_enable = true; pim_ifp->gm_enable = true;
need_startup = 1; need_startup = 1;
} }
} }
@ -2565,7 +2565,7 @@ int lib_interface_gmp_address_family_destroy(struct nb_cb_destroy_args *args)
if (!pim_ifp) if (!pim_ifp)
return NB_OK; return NB_OK;
pim_ifp->igmp_enable = false; pim_ifp->gm_enable = false;
pim_if_membership_clear(ifp); pim_if_membership_clear(ifp);
@ -2586,7 +2586,7 @@ int lib_interface_gmp_address_family_enable_modify(
{ {
#if PIM_IPV == 4 #if PIM_IPV == 4
struct interface *ifp; struct interface *ifp;
bool igmp_enable; bool gm_enable;
struct pim_interface *pim_ifp; struct pim_interface *pim_ifp;
int mcast_if_count; int mcast_if_count;
const char *ifp_name; const char *ifp_name;
@ -2611,9 +2611,9 @@ int lib_interface_gmp_address_family_enable_modify(
break; break;
case NB_EV_APPLY: case NB_EV_APPLY:
ifp = nb_running_get_entry(args->dnode, NULL, true); ifp = nb_running_get_entry(args->dnode, NULL, true);
igmp_enable = yang_dnode_get_bool(args->dnode, NULL); gm_enable = yang_dnode_get_bool(args->dnode, NULL);
if (igmp_enable) if (gm_enable)
return pim_cmd_igmp_start(ifp); return pim_cmd_igmp_start(ifp);
else { else {
@ -2622,7 +2622,7 @@ int lib_interface_gmp_address_family_enable_modify(
if (!pim_ifp) if (!pim_ifp)
return NB_ERR_INCONSISTENCY; return NB_ERR_INCONSISTENCY;
pim_ifp->igmp_enable = false; pim_ifp->gm_enable = false;
pim_if_membership_clear(ifp); pim_if_membership_clear(ifp);

View File

@ -296,7 +296,7 @@ static int gm_config_write(struct vty *vty, int writes,
struct pim_interface *pim_ifp) struct pim_interface *pim_ifp)
{ {
/* IF ip igmp */ /* IF ip igmp */
if (pim_ifp->igmp_enable) { if (pim_ifp->gm_enable) {
vty_out(vty, " ip igmp\n"); vty_out(vty, " ip igmp\n");
++writes; ++writes;
} }

View File

@ -1172,7 +1172,7 @@ void pim_vxlan_del_term_dev(struct pim_instance *pim)
pim_ifp = (struct pim_interface *)ifp->info; pim_ifp = (struct pim_interface *)ifp->info;
if (pim_ifp) { if (pim_ifp) {
pim_ifp->pim_enable = false; pim_ifp->pim_enable = false;
if (!pim_ifp->igmp_enable) if (!pim_ifp->gm_enable)
pim_if_delete(ifp); pim_if_delete(ifp);
} }
} }