forked from Mirror/frr
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:
parent
15a5dafe44
commit
d2772e7b65
|
@ -4440,7 +4440,7 @@ DEFUN (interface_no_ip_pim_drprio,
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -4454,14 +4454,12 @@ pim_cmd_interface_add (struct interface *ifp, enum pim_interface_type itype)
|
|||
PIM_IF_DO_PIM(pim_ifp->options);
|
||||
}
|
||||
|
||||
pim_ifp->itype = itype;
|
||||
pim_if_addr_add_all(ifp);
|
||||
pim_if_membership_refresh(ifp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
DEFUN (interface_ip_pim_ssm,
|
||||
DEFUN_HIDDEN (interface_ip_pim_ssm,
|
||||
interface_ip_pim_ssm_cmd,
|
||||
"ip pim ssm",
|
||||
IP_STR
|
||||
|
@ -4470,11 +4468,12 @@ DEFUN (interface_ip_pim_ssm,
|
|||
{
|
||||
VTY_DECLVAR_CONTEXT(interface, ifp);
|
||||
|
||||
if (!pim_cmd_interface_add(ifp, PIM_INTERFACE_SSM)) {
|
||||
vty_out(vty, "Could not enable PIM SSM on interface%s", VTY_NEWLINE);
|
||||
if (!pim_cmd_interface_add(ifp)) {
|
||||
vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
vty_out(vty, "WARN: Enabled PIM SM on interface; configure PIM SSM range if needed%s", VTY_NEWLINE);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -4486,7 +4485,7 @@ DEFUN (interface_ip_pim_sm,
|
|||
IFACE_PIM_SM_STR)
|
||||
{
|
||||
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);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
@ -4522,7 +4521,7 @@ pim_cmd_interface_delete (struct interface *ifp)
|
|||
return 1;
|
||||
}
|
||||
|
||||
DEFUN (interface_no_ip_pim_ssm,
|
||||
DEFUN_HIDDEN (interface_no_ip_pim_ssm,
|
||||
interface_no_ip_pim_ssm_cmd,
|
||||
"no ip pim ssm",
|
||||
NO_STR
|
||||
|
|
|
@ -58,11 +58,6 @@ struct pim_iface_upstream_switch {
|
|||
struct list *us;
|
||||
};
|
||||
|
||||
enum pim_interface_type {
|
||||
PIM_INTERFACE_SSM,
|
||||
PIM_INTERFACE_SM
|
||||
};
|
||||
|
||||
enum pim_secondary_addr_flags {
|
||||
PIM_SEC_ADDRF_NONE = 0,
|
||||
PIM_SEC_ADDRF_STALE = (1 << 0)
|
||||
|
@ -74,7 +69,6 @@ struct pim_secondary_addr {
|
|||
};
|
||||
|
||||
struct pim_interface {
|
||||
enum pim_interface_type itype;
|
||||
uint32_t options; /* bit vector */
|
||||
ifindex_t mroute_vif_index;
|
||||
struct in_addr primary_address; /* remember addr to detect change */
|
||||
|
|
|
@ -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)) ||
|
||||
(!pim_ifp) ||
|
||||
(!(PIM_I_am_DR(pim_ifp))) ||
|
||||
(pim_ifp->itype == PIM_INTERFACE_SSM))
|
||||
(!(PIM_I_am_DR(pim_ifp))))
|
||||
{
|
||||
if (PIM_DEBUG_MROUTE_DETAIL)
|
||||
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)) ||
|
||||
(!pim_ifp) ||
|
||||
(!(PIM_I_am_DR(pim_ifp))) ||
|
||||
(pim_ifp->itype == PIM_INTERFACE_SSM)) {
|
||||
(!(PIM_I_am_DR(pim_ifp)))) {
|
||||
if (PIM_DEBUG_MROUTE) {
|
||||
zlog_debug("%s: Failed Check send packet", __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
|
|
@ -214,11 +214,7 @@ int pim_interface_config_write(struct vty *vty)
|
|||
if (ifp->info) {
|
||||
struct pim_interface *pim_ifp = ifp->info;
|
||||
|
||||
/* IF ip pim ssm */
|
||||
if (PIM_IF_TEST_PIM(pim_ifp->options)) {
|
||||
if (pim_ifp->itype == PIM_INTERFACE_SSM)
|
||||
vty_out(vty, " ip pim ssm%s", VTY_NEWLINE);
|
||||
else
|
||||
vty_out(vty, " ip pim sm%s", VTY_NEWLINE);
|
||||
++writes;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue