mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 22:27:47 +00:00
pimd: Add the ability to never SPT switchover
Add the ability to allow pim to determine if we should allow spt-switchover or not on the LHR. Signed-off-by: Donald Sharp
This commit is contained in:
parent
2830b01863
commit
a7b2b1e298
@ -3416,6 +3416,35 @@ pim_rp_cmd_worker (struct vty *vty, const char *rp, const char *group, const cha
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (ip_pim_spt_switchover_infinity,
|
||||||
|
ip_pim_spt_switchover_infinity_cmd,
|
||||||
|
"ip pim spt-switchover infinity-and-beyond",
|
||||||
|
IP_STR
|
||||||
|
PIM_STR
|
||||||
|
"SPT-Switchover\n"
|
||||||
|
"Never switch to SPT Tree\n")
|
||||||
|
{
|
||||||
|
pimg->spt_switchover = PIM_SPT_INFINITY;
|
||||||
|
|
||||||
|
pim_upstream_remove_lhr_star_pimreg();
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN (no_ip_pim_spt_switchover_infinity,
|
||||||
|
no_ip_pim_spt_switchover_infinity_cmd,
|
||||||
|
"no ip pim spt-switchover infinity-and-beyond",
|
||||||
|
NO_STR
|
||||||
|
IP_STR
|
||||||
|
PIM_STR
|
||||||
|
"SPT_Switchover\n"
|
||||||
|
"Never switch to SPT Tree\n")
|
||||||
|
{
|
||||||
|
pimg->spt_switchover = PIM_SPT_IMMEDIATE;
|
||||||
|
|
||||||
|
pim_upstream_add_lhr_star_pimreg();
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_joinprune_time,
|
DEFUN (ip_pim_joinprune_time,
|
||||||
ip_pim_joinprune_time_cmd,
|
ip_pim_joinprune_time_cmd,
|
||||||
"ip pim join-prune-interval <60-600>",
|
"ip pim join-prune-interval <60-600>",
|
||||||
@ -6187,6 +6216,8 @@ void pim_cmd_init()
|
|||||||
install_element (CONFIG_NODE, &ip_pim_ssm_prefix_list_cmd);
|
install_element (CONFIG_NODE, &ip_pim_ssm_prefix_list_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_pim_register_suppress_cmd);
|
install_element (CONFIG_NODE, &ip_pim_register_suppress_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_pim_register_suppress_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_register_suppress_cmd);
|
||||||
|
install_element (CONFIG_NODE, &ip_pim_spt_switchover_infinity_cmd);
|
||||||
|
install_element (CONFIG_NODE, &no_ip_pim_spt_switchover_infinity_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_pim_joinprune_time_cmd);
|
install_element (CONFIG_NODE, &ip_pim_joinprune_time_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_pim_joinprune_time_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_joinprune_time_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_pim_keep_alive_cmd);
|
install_element (CONFIG_NODE, &ip_pim_keep_alive_cmd);
|
||||||
|
@ -1006,6 +1006,7 @@ pim_ifchannel_local_membership_add(struct interface *ifp,
|
|||||||
pim_upstream_switch (child, PIM_UPSTREAM_JOINED);
|
pim_upstream_switch (child, PIM_UPSTREAM_JOINED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pimg->spt_switchover != PIM_SPT_INFINITY)
|
||||||
pim_channel_add_oif(up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_IGMP);
|
pim_channel_add_oif(up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_IGMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1676,6 +1676,42 @@ pim_upstream_sg_running (void *arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pim_upstream_add_lhr_star_pimreg (void)
|
||||||
|
{
|
||||||
|
struct pim_upstream *up;
|
||||||
|
struct listnode *node;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS_RO (pim_upstream_list, node, up))
|
||||||
|
{
|
||||||
|
if (up->sg.src.s_addr != INADDR_ANY)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!PIM_UPSTREAM_FLAG_TEST_SRC_IGMP (up->flags))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pim_channel_add_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_IGMP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pim_upstream_remove_lhr_star_pimreg (void)
|
||||||
|
{
|
||||||
|
struct pim_upstream *up;
|
||||||
|
struct listnode *node;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS_RO (pim_upstream_list, node, up))
|
||||||
|
{
|
||||||
|
if (up->sg.src.s_addr != INADDR_ANY)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!PIM_UPSTREAM_FLAG_TEST_SRC_IGMP (up->flags))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pim_channel_del_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_IGMP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pim_upstream_init (void)
|
pim_upstream_init (void)
|
||||||
{
|
{
|
||||||
|
@ -198,4 +198,7 @@ void pim_upstream_terminate (void);
|
|||||||
void join_timer_start (struct pim_upstream *up);
|
void join_timer_start (struct pim_upstream *up);
|
||||||
int pim_upstream_compare (void *arg1, void *arg2);
|
int pim_upstream_compare (void *arg1, void *arg2);
|
||||||
void pim_upstream_register_reevaluate (void);
|
void pim_upstream_register_reevaluate (void);
|
||||||
|
|
||||||
|
void pim_upstream_add_lhr_star_pimreg (void);
|
||||||
|
void pim_upstream_remove_lhr_star_pimreg (void);
|
||||||
#endif /* PIM_UPSTREAM_H */
|
#endif /* PIM_UPSTREAM_H */
|
||||||
|
@ -182,6 +182,12 @@ int pim_global_config_write(struct vty *vty)
|
|||||||
ssm->plist_name, VTY_NEWLINE);
|
ssm->plist_name, VTY_NEWLINE);
|
||||||
++writes;
|
++writes;
|
||||||
}
|
}
|
||||||
|
if (pimg->spt_switchover == PIM_SPT_INFINITY)
|
||||||
|
{
|
||||||
|
vty_out (vty, "ip pim spt-switchover infinity-and-beyond%s",
|
||||||
|
VTY_NEWLINE);
|
||||||
|
++writes;
|
||||||
|
}
|
||||||
|
|
||||||
if (qpim_ssmpingd_list) {
|
if (qpim_ssmpingd_list) {
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
@ -249,6 +249,7 @@ pim_instance_init (vrf_id_t vrf_id, afi_t afi)
|
|||||||
pim->vrf_id = vrf_id;
|
pim->vrf_id = vrf_id;
|
||||||
pim->afi = afi;
|
pim->afi = afi;
|
||||||
|
|
||||||
|
pim->spt_switchover = PIM_SPT_IMMEDIATE;
|
||||||
pim->rpf_hash = hash_create_size (256, pim_rpf_hash_key, pim_rpf_equal);
|
pim->rpf_hash = hash_create_size (256, pim_rpf_hash_key, pim_rpf_equal);
|
||||||
|
|
||||||
if (PIM_DEBUG_ZEBRA)
|
if (PIM_DEBUG_ZEBRA)
|
||||||
|
@ -237,11 +237,19 @@ extern int32_t qpim_register_probe_time;
|
|||||||
#define PIM_DONT_DEBUG_MSDP_PACKETS (qpim_debugs &= ~PIM_MASK_MSDP_PACKETS)
|
#define PIM_DONT_DEBUG_MSDP_PACKETS (qpim_debugs &= ~PIM_MASK_MSDP_PACKETS)
|
||||||
#define PIM_DONT_DEBUG_MSDP_INTERNAL (qpim_debugs &= ~PIM_MASK_MSDP_INTERNAL)
|
#define PIM_DONT_DEBUG_MSDP_INTERNAL (qpim_debugs &= ~PIM_MASK_MSDP_INTERNAL)
|
||||||
|
|
||||||
|
enum pim_spt_switchover {
|
||||||
|
PIM_SPT_IMMEDIATE,
|
||||||
|
PIM_SPT_INFINITY,
|
||||||
|
};
|
||||||
|
|
||||||
/* Per VRF PIM DB */
|
/* Per VRF PIM DB */
|
||||||
struct pim_instance
|
struct pim_instance
|
||||||
{
|
{
|
||||||
afi_t afi;
|
afi_t afi;
|
||||||
vrf_id_t vrf_id;
|
vrf_id_t vrf_id;
|
||||||
|
|
||||||
|
enum pim_spt_switchover spt_switchover;
|
||||||
|
|
||||||
struct hash *rpf_hash;
|
struct hash *rpf_hash;
|
||||||
void *ssm_info; /* per-vrf SSM configuration */
|
void *ssm_info; /* per-vrf SSM configuration */
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user