mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
Merge pull request #10931 from g-balaji1/pimv6-ssm-cmds
pim6d: Addition of ipv6 ssmpingd config commands
This commit is contained in:
commit
4e3ccd396c
@ -113,6 +113,14 @@ Certain signals have special meanings to *pim6d*.
|
|||||||
notifications to the kernel. This command is vrf aware, to configure for a
|
notifications to the kernel. This command is vrf aware, to configure for a
|
||||||
vrf, enter the vrf submode.
|
vrf, enter the vrf submode.
|
||||||
|
|
||||||
|
.. clicmd:: ipv6 ssmpingd [X:X::X:X]
|
||||||
|
|
||||||
|
Enable ipv6 ssmpingd configuration. A network level management tool
|
||||||
|
to check whether one can receive multicast packets via SSM from host.
|
||||||
|
The host target given to ssmping must run the ssmpingd daemon which listens
|
||||||
|
for IPv4 and IPv6 unicast requests. When it receives one, it responds to a
|
||||||
|
well known SSM multicast group which ssmping just have joined.
|
||||||
|
|
||||||
.. _pimv6-interface-configuration:
|
.. _pimv6-interface-configuration:
|
||||||
|
|
||||||
PIMv6 Interface Configuration
|
PIMv6 Interface Configuration
|
||||||
|
@ -451,6 +451,33 @@ DEFPY (no_ipv6_pim_rp_prefix_list,
|
|||||||
return pim_process_no_rp_plist_cmd(vty, rp_str, plist);
|
return pim_process_no_rp_plist_cmd(vty, rp_str, plist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DEFPY (ipv6_ssmpingd,
|
||||||
|
ipv6_ssmpingd_cmd,
|
||||||
|
"ipv6 ssmpingd [X:X::X:X]$source",
|
||||||
|
IPV6_STR
|
||||||
|
CONF_SSMPINGD_STR
|
||||||
|
"Source address\n")
|
||||||
|
{
|
||||||
|
const char *src_str = (source_str) ? source_str : "::";
|
||||||
|
|
||||||
|
return pim_process_ssmpingd_cmd(vty, NB_OP_CREATE, src_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DEFPY (no_ipv6_ssmpingd,
|
||||||
|
no_ipv6_ssmpingd_cmd,
|
||||||
|
"no ipv6 ssmpingd [X:X::X:X]$source",
|
||||||
|
NO_STR
|
||||||
|
IPV6_STR
|
||||||
|
CONF_SSMPINGD_STR
|
||||||
|
"Source address\n")
|
||||||
|
{
|
||||||
|
const char *src_str = (source_str) ? source_str : "::";
|
||||||
|
|
||||||
|
return pim_process_ssmpingd_cmd(vty, NB_OP_DESTROY, src_str);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY (interface_ipv6_mld_join,
|
DEFPY (interface_ipv6_mld_join,
|
||||||
interface_ipv6_mld_join_cmd,
|
interface_ipv6_mld_join_cmd,
|
||||||
"ipv6 mld join X:X::X:X$group [X:X::X:X$source]",
|
"ipv6 mld join X:X::X:X$group [X:X::X:X$source]",
|
||||||
@ -1588,6 +1615,10 @@ void pim_cmd_init(void)
|
|||||||
install_element(VRF_NODE, &ipv6_pim_rp_prefix_list_cmd);
|
install_element(VRF_NODE, &ipv6_pim_rp_prefix_list_cmd);
|
||||||
install_element(CONFIG_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
|
install_element(CONFIG_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
|
||||||
install_element(VRF_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
|
install_element(VRF_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
|
||||||
|
install_element(CONFIG_NODE, &ipv6_ssmpingd_cmd);
|
||||||
|
install_element(VRF_NODE, &ipv6_ssmpingd_cmd);
|
||||||
|
install_element(CONFIG_NODE, &no_ipv6_ssmpingd_cmd);
|
||||||
|
install_element(VRF_NODE, &no_ipv6_ssmpingd_cmd);
|
||||||
install_element(INTERFACE_NODE, &interface_ipv6_mld_cmd);
|
install_element(INTERFACE_NODE, &interface_ipv6_mld_cmd);
|
||||||
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_cmd);
|
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_cmd);
|
||||||
install_element(INTERFACE_NODE, &interface_ipv6_mld_join_cmd);
|
install_element(INTERFACE_NODE, &interface_ipv6_mld_join_cmd);
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#define DEBUG_MLD_EVENTS_STR "MLD protocol events\n"
|
#define DEBUG_MLD_EVENTS_STR "MLD protocol events\n"
|
||||||
#define DEBUG_MLD_PACKETS_STR "MLD protocol packets\n"
|
#define DEBUG_MLD_PACKETS_STR "MLD protocol packets\n"
|
||||||
#define DEBUG_MLD_TRACE_STR "MLD internal daemon activity\n"
|
#define DEBUG_MLD_TRACE_STR "MLD internal daemon activity\n"
|
||||||
|
#define CONF_SSMPINGD_STR "Enable ssmpingd operation\n"
|
||||||
|
|
||||||
void pim_cmd_init(void);
|
void pim_cmd_init(void);
|
||||||
|
|
||||||
|
@ -5314,24 +5314,9 @@ DEFUN (ip_ssmpingd,
|
|||||||
"Source address\n")
|
"Source address\n")
|
||||||
{
|
{
|
||||||
int idx_ipv4 = 2;
|
int idx_ipv4 = 2;
|
||||||
const char *source_str = (argc == 3) ? argv[idx_ipv4]->arg : "0.0.0.0";
|
const char *src_str = (argc == 3) ? argv[idx_ipv4]->arg : "0.0.0.0";
|
||||||
const char *vrfname;
|
|
||||||
char ssmpingd_ip_xpath[XPATH_MAXLEN];
|
|
||||||
|
|
||||||
vrfname = pim_cli_get_vrf_name(vty);
|
return pim_process_ssmpingd_cmd(vty, NB_OP_CREATE, src_str);
|
||||||
if (vrfname == NULL)
|
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
|
||||||
|
|
||||||
snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
|
|
||||||
FRR_PIM_VRF_XPATH,
|
|
||||||
"frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4");
|
|
||||||
strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
|
|
||||||
sizeof(ssmpingd_ip_xpath));
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, NB_OP_CREATE,
|
|
||||||
source_str);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (no_ip_ssmpingd,
|
DEFUN (no_ip_ssmpingd,
|
||||||
@ -5342,25 +5327,10 @@ DEFUN (no_ip_ssmpingd,
|
|||||||
CONF_SSMPINGD_STR
|
CONF_SSMPINGD_STR
|
||||||
"Source address\n")
|
"Source address\n")
|
||||||
{
|
{
|
||||||
const char *vrfname;
|
|
||||||
int idx_ipv4 = 3;
|
int idx_ipv4 = 3;
|
||||||
const char *source_str = (argc == 4) ? argv[idx_ipv4]->arg : "0.0.0.0";
|
const char *src_str = (argc == 4) ? argv[idx_ipv4]->arg : "0.0.0.0";
|
||||||
char ssmpingd_ip_xpath[XPATH_MAXLEN];
|
|
||||||
|
|
||||||
vrfname = pim_cli_get_vrf_name(vty);
|
return pim_process_ssmpingd_cmd(vty, NB_OP_DESTROY, src_str);
|
||||||
if (vrfname == NULL)
|
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
|
||||||
|
|
||||||
snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
|
|
||||||
FRR_PIM_VRF_XPATH,
|
|
||||||
"frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4");
|
|
||||||
strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
|
|
||||||
sizeof(ssmpingd_ip_xpath));
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, NB_OP_DESTROY,
|
|
||||||
source_str);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_ecmp,
|
DEFUN (ip_pim_ecmp,
|
||||||
|
@ -2840,3 +2840,25 @@ int gm_process_no_last_member_query_interval_cmd(struct vty *vty)
|
|||||||
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
FRR_PIM_AF_XPATH_VAL);
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int pim_process_ssmpingd_cmd(struct vty *vty, enum nb_operation operation,
|
||||||
|
const char *src_str)
|
||||||
|
{
|
||||||
|
const char *vrfname;
|
||||||
|
char ssmpingd_ip_xpath[XPATH_MAXLEN];
|
||||||
|
|
||||||
|
vrfname = pim_cli_get_vrf_name(vty);
|
||||||
|
if (vrfname == NULL)
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
|
||||||
|
snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
|
||||||
|
FRR_PIM_VRF_XPATH, "frr-pim:pimd", "pim", vrfname,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
|
||||||
|
sizeof(ssmpingd_ip_xpath));
|
||||||
|
|
||||||
|
nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, operation, src_str);
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
|
}
|
||||||
|
@ -102,6 +102,8 @@ int gm_process_no_last_member_query_count_cmd(struct vty *vty);
|
|||||||
int gm_process_last_member_query_interval_cmd(struct vty *vty,
|
int gm_process_last_member_query_interval_cmd(struct vty *vty,
|
||||||
const char *lmqi_str);
|
const char *lmqi_str);
|
||||||
int gm_process_no_last_member_query_interval_cmd(struct vty *vty);
|
int gm_process_no_last_member_query_interval_cmd(struct vty *vty);
|
||||||
|
int pim_process_ssmpingd_cmd(struct vty *vty, enum nb_operation operation,
|
||||||
|
const char *src_str);
|
||||||
/*
|
/*
|
||||||
* Special Macro to allow us to get the correct pim_instance
|
* Special Macro to allow us to get the correct pim_instance
|
||||||
*/
|
*/
|
||||||
|
@ -361,10 +361,8 @@ int pim_ssmpingd_start(struct pim_instance *pim, pim_addr source_addr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
|
||||||
zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
|
&source_addr);
|
||||||
&source_addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
ss = ssmpingd_new(pim, source_addr);
|
ss = ssmpingd_new(pim, source_addr);
|
||||||
if (!ss) {
|
if (!ss) {
|
||||||
|
@ -264,8 +264,8 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
|
|||||||
struct ssmpingd_sock *ss;
|
struct ssmpingd_sock *ss;
|
||||||
++writes;
|
++writes;
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim->ssmpingd_list, node, ss)) {
|
for (ALL_LIST_ELEMENTS_RO(pim->ssmpingd_list, node, ss)) {
|
||||||
vty_out(vty, "%sip ssmpingd %pPA\n", spaces,
|
vty_out(vty, "%s" PIM_AF_NAME " ssmpingd %pPA\n",
|
||||||
&ss->source_addr);
|
spaces, &ss->source_addr);
|
||||||
++writes;
|
++writes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user