pimd: Remove interface type SSM.

Interface type has been replaced with the SSM range config. And SSM
groups can now co-exists with ASM groups. I have left the pim ssm
per-interface cli control hidden. It now enables pim-sm with a warning.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-15344
Testing Done: pim-smoke
This commit is contained in:
anuradhak 2017-03-21 10:12:30 -07:00
parent 15a5dafe44
commit d2772e7b65
4 changed files with 10 additions and 23 deletions

View file

@ -4440,7 +4440,7 @@ DEFUN (interface_no_ip_pim_drprio,
} }
static int static int
pim_cmd_interface_add (struct interface *ifp, enum pim_interface_type itype) pim_cmd_interface_add (struct interface *ifp)
{ {
struct pim_interface *pim_ifp = ifp->info; struct pim_interface *pim_ifp = ifp->info;
@ -4454,14 +4454,12 @@ pim_cmd_interface_add (struct interface *ifp, enum pim_interface_type itype)
PIM_IF_DO_PIM(pim_ifp->options); PIM_IF_DO_PIM(pim_ifp->options);
} }
pim_ifp->itype = itype;
pim_if_addr_add_all(ifp); pim_if_addr_add_all(ifp);
pim_if_membership_refresh(ifp); pim_if_membership_refresh(ifp);
return 1; return 1;
} }
DEFUN_HIDDEN (interface_ip_pim_ssm,
DEFUN (interface_ip_pim_ssm,
interface_ip_pim_ssm_cmd, interface_ip_pim_ssm_cmd,
"ip pim ssm", "ip pim ssm",
IP_STR IP_STR
@ -4470,11 +4468,12 @@ DEFUN (interface_ip_pim_ssm,
{ {
VTY_DECLVAR_CONTEXT(interface, ifp); VTY_DECLVAR_CONTEXT(interface, ifp);
if (!pim_cmd_interface_add(ifp, PIM_INTERFACE_SSM)) { if (!pim_cmd_interface_add(ifp)) {
vty_out(vty, "Could not enable PIM SSM on interface%s", VTY_NEWLINE); vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE);
return CMD_WARNING; return CMD_WARNING;
} }
vty_out(vty, "WARN: Enabled PIM SM on interface; configure PIM SSM range if needed%s", VTY_NEWLINE);
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -4486,7 +4485,7 @@ DEFUN (interface_ip_pim_sm,
IFACE_PIM_SM_STR) IFACE_PIM_SM_STR)
{ {
VTY_DECLVAR_CONTEXT(interface, ifp); VTY_DECLVAR_CONTEXT(interface, ifp);
if (!pim_cmd_interface_add(ifp, PIM_INTERFACE_SM)) { if (!pim_cmd_interface_add(ifp)) {
vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE); vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE);
return CMD_WARNING; return CMD_WARNING;
} }
@ -4522,7 +4521,7 @@ pim_cmd_interface_delete (struct interface *ifp)
return 1; return 1;
} }
DEFUN (interface_no_ip_pim_ssm, DEFUN_HIDDEN (interface_no_ip_pim_ssm,
interface_no_ip_pim_ssm_cmd, interface_no_ip_pim_ssm_cmd,
"no ip pim ssm", "no ip pim ssm",
NO_STR NO_STR

View file

@ -58,11 +58,6 @@ struct pim_iface_upstream_switch {
struct list *us; struct list *us;
}; };
enum pim_interface_type {
PIM_INTERFACE_SSM,
PIM_INTERFACE_SM
};
enum pim_secondary_addr_flags { enum pim_secondary_addr_flags {
PIM_SEC_ADDRF_NONE = 0, PIM_SEC_ADDRF_NONE = 0,
PIM_SEC_ADDRF_STALE = (1 << 0) PIM_SEC_ADDRF_STALE = (1 << 0)
@ -74,7 +69,6 @@ struct pim_secondary_addr {
}; };
struct pim_interface { struct pim_interface {
enum pim_interface_type itype;
uint32_t options; /* bit vector */ uint32_t options; /* bit vector */
ifindex_t mroute_vif_index; ifindex_t mroute_vif_index;
struct in_addr primary_address; /* remember addr to detect change */ struct in_addr primary_address; /* remember addr to detect change */

View file

@ -128,8 +128,7 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
*/ */
if ((pim_rpf_addr_is_inaddr_none (rpg)) || if ((pim_rpf_addr_is_inaddr_none (rpg)) ||
(!pim_ifp) || (!pim_ifp) ||
(!(PIM_I_am_DR(pim_ifp))) || (!(PIM_I_am_DR(pim_ifp))))
(pim_ifp->itype == PIM_INTERFACE_SSM))
{ {
if (PIM_DEBUG_MROUTE_DETAIL) if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug ("%s: Interface is not configured correctly to handle incoming packet: Could be !DR, !pim_ifp, !SM, !RP", zlog_debug ("%s: Interface is not configured correctly to handle incoming packet: Could be !DR, !pim_ifp, !SM, !RP",
@ -214,8 +213,7 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf)
if ((pim_rpf_addr_is_inaddr_none (rpg)) || if ((pim_rpf_addr_is_inaddr_none (rpg)) ||
(!pim_ifp) || (!pim_ifp) ||
(!(PIM_I_am_DR(pim_ifp))) || (!(PIM_I_am_DR(pim_ifp)))) {
(pim_ifp->itype == PIM_INTERFACE_SSM)) {
if (PIM_DEBUG_MROUTE) { if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: Failed Check send packet", __PRETTY_FUNCTION__); zlog_debug("%s: Failed Check send packet", __PRETTY_FUNCTION__);
} }

View file

@ -214,12 +214,8 @@ int pim_interface_config_write(struct vty *vty)
if (ifp->info) { if (ifp->info) {
struct pim_interface *pim_ifp = ifp->info; struct pim_interface *pim_ifp = ifp->info;
/* IF ip pim ssm */
if (PIM_IF_TEST_PIM(pim_ifp->options)) { if (PIM_IF_TEST_PIM(pim_ifp->options)) {
if (pim_ifp->itype == PIM_INTERFACE_SSM) vty_out(vty, " ip pim sm%s", VTY_NEWLINE);
vty_out(vty, " ip pim ssm%s", VTY_NEWLINE);
else
vty_out(vty, " ip pim sm%s", VTY_NEWLINE);
++writes; ++writes;
} }