mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 15:17:15 +00:00
pim6d: Adding "ipv6 mld query-interval" CLI
Adding the Interface level config command ipv6 mld query-interval <1-65535> This command can be use to tune the timing for the general queries sent by the querier. Signed-off-by: Abhishek N R <abnr@vmware.com>
This commit is contained in:
parent
47d4af36d8
commit
5795b17cc3
@ -579,6 +579,49 @@ DEFPY (interface_no_ipv6_mld_version,
|
|||||||
"frr-routing:ipv6");
|
"frr-routing:ipv6");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFPY (interface_ipv6_mld_query_interval,
|
||||||
|
interface_ipv6_mld_query_interval_cmd,
|
||||||
|
"ipv6 mld query-interval (1-65535)$q_interval",
|
||||||
|
IPV6_STR
|
||||||
|
IFACE_MLD_STR
|
||||||
|
IFACE_MLD_QUERY_INTERVAL_STR
|
||||||
|
"Query interval in seconds\n")
|
||||||
|
{
|
||||||
|
const struct lyd_node *pim_enable_dnode;
|
||||||
|
|
||||||
|
pim_enable_dnode = yang_dnode_getf(vty->candidate_config->dnode,
|
||||||
|
FRR_PIM_ENABLE_XPATH, VTY_CURR_XPATH,
|
||||||
|
"frr-routing:ipv6");
|
||||||
|
if (!pim_enable_dnode) {
|
||||||
|
nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true");
|
||||||
|
} else {
|
||||||
|
if (!yang_dnode_get_bool(pim_enable_dnode, "."))
|
||||||
|
nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY,
|
||||||
|
"true");
|
||||||
|
}
|
||||||
|
|
||||||
|
nb_cli_enqueue_change(vty, "./query-interval", NB_OP_MODIFY,
|
||||||
|
q_interval_str);
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
|
"frr-routing:ipv6");
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFPY (interface_no_ipv6_mld_query_interval,
|
||||||
|
interface_no_ipv6_mld_query_interval_cmd,
|
||||||
|
"no ipv6 mld query-interval [(1-65535)]",
|
||||||
|
NO_STR
|
||||||
|
IPV6_STR
|
||||||
|
IFACE_MLD_STR
|
||||||
|
IFACE_MLD_QUERY_INTERVAL_STR
|
||||||
|
IGNORED_IN_NO_STR)
|
||||||
|
{
|
||||||
|
nb_cli_enqueue_change(vty, "./query-interval", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
|
"frr-routing:ipv6");
|
||||||
|
}
|
||||||
|
|
||||||
void pim_cmd_init(void)
|
void pim_cmd_init(void)
|
||||||
{
|
{
|
||||||
if_cmd_init(pim_interface_config_write);
|
if_cmd_init(pim_interface_config_write);
|
||||||
@ -628,4 +671,7 @@ void pim_cmd_init(void)
|
|||||||
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_join_cmd);
|
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_join_cmd);
|
||||||
install_element(INTERFACE_NODE, &interface_ipv6_mld_version_cmd);
|
install_element(INTERFACE_NODE, &interface_ipv6_mld_version_cmd);
|
||||||
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_version_cmd);
|
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_version_cmd);
|
||||||
|
install_element(INTERFACE_NODE, &interface_ipv6_mld_query_interval_cmd);
|
||||||
|
install_element(INTERFACE_NODE,
|
||||||
|
&interface_no_ipv6_mld_query_interval_cmd);
|
||||||
}
|
}
|
||||||
|
@ -384,6 +384,7 @@ static int pim_cmd_igmp_start(struct interface *ifp)
|
|||||||
* This function propagates the reconfiguration to every active socket
|
* This function propagates the reconfiguration to every active socket
|
||||||
* for that interface.
|
* for that interface.
|
||||||
*/
|
*/
|
||||||
|
#if PIM_IPV == 4
|
||||||
static void igmp_sock_query_interval_reconfig(struct gm_sock *igmp)
|
static void igmp_sock_query_interval_reconfig(struct gm_sock *igmp)
|
||||||
{
|
{
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
@ -408,6 +409,7 @@ static void igmp_sock_query_interval_reconfig(struct gm_sock *igmp)
|
|||||||
*/
|
*/
|
||||||
igmp_startup_mode_on(igmp);
|
igmp_startup_mode_on(igmp);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void igmp_sock_query_reschedule(struct gm_sock *igmp)
|
static void igmp_sock_query_reschedule(struct gm_sock *igmp)
|
||||||
{
|
{
|
||||||
@ -438,6 +440,7 @@ static void igmp_sock_query_reschedule(struct gm_sock *igmp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PIM_IPV == 4
|
||||||
static void change_query_interval(struct pim_interface *pim_ifp,
|
static void change_query_interval(struct pim_interface *pim_ifp,
|
||||||
int query_interval)
|
int query_interval)
|
||||||
{
|
{
|
||||||
@ -451,6 +454,7 @@ static void change_query_interval(struct pim_interface *pim_ifp,
|
|||||||
igmp_sock_query_reschedule(igmp);
|
igmp_sock_query_reschedule(igmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void change_query_max_response_time(struct pim_interface *pim_ifp,
|
static void change_query_max_response_time(struct pim_interface *pim_ifp,
|
||||||
int query_max_response_time_dsec)
|
int query_max_response_time_dsec)
|
||||||
@ -2707,6 +2711,7 @@ int lib_interface_gmp_address_family_mld_version_destroy(
|
|||||||
int lib_interface_gmp_address_family_query_interval_modify(
|
int lib_interface_gmp_address_family_query_interval_modify(
|
||||||
struct nb_cb_modify_args *args)
|
struct nb_cb_modify_args *args)
|
||||||
{
|
{
|
||||||
|
#if PIM_IPV == 4
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
int query_interval;
|
int query_interval;
|
||||||
|
|
||||||
@ -2720,7 +2725,9 @@ int lib_interface_gmp_address_family_query_interval_modify(
|
|||||||
query_interval = yang_dnode_get_uint16(args->dnode, NULL);
|
query_interval = yang_dnode_get_uint16(args->dnode, NULL);
|
||||||
change_query_interval(ifp->info, query_interval);
|
change_query_interval(ifp->info, query_interval);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* TBD Depends on MLD data structure changes */
|
||||||
|
#endif
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user