DEFPY (interface_ipv6_mld_query_max_response_time,
interface_ipv6_mld_query_max_response_time_cmd,
- "ipv6 mld query-max-response-time (1-65535)$qmrt",
+ "[no] ipv6 mld query-max-response-time ![(1-65535)$qmrt]",
+ NO_STR
IPV6_STR
IFACE_MLD_STR
IFACE_MLD_QUERY_MAX_RESPONSE_TIME_STR
"Query response value in milliseconds\n")
{
+ if (no)
+ return gm_process_no_query_max_response_time_cmd(vty);
return gm_process_query_max_response_time_cmd(vty, qmrt_str);
}
-DEFPY (interface_no_ipv6_mld_query_max_response_time,
- interface_no_ipv6_mld_query_max_response_time_cmd,
- "no ipv6 mld query-max-response-time [(1-65535)]",
- NO_STR
- IPV6_STR
- IFACE_MLD_STR
- IFACE_MLD_QUERY_MAX_RESPONSE_TIME_STR
- IGNORED_IN_NO_STR)
-{
- return gm_process_no_query_max_response_time_cmd(vty);
-}
-
-DEFPY (interface_ipv6_mld_last_member_query_count,
- interface_ipv6_mld_last_member_query_count_cmd,
- "ipv6 mld last-member-query-count (1-255)$lmqc",
- IPV6_STR
- IFACE_MLD_STR
- IFACE_MLD_LAST_MEMBER_QUERY_COUNT_STR
- "Last member query count\n")
-{
- return gm_process_last_member_query_count_cmd(vty, lmqc_str);
-}
-
-DEFPY (interface_no_ipv6_mld_last_member_query_count,
- interface_no_ipv6_mld_last_member_query_count_cmd,
- "no ipv6 mld last-member-query-count [(1-255)]",
+DEFPY (interface_ipv6_mld_robustness,
+ interface_ipv6_mld_robustness_cmd,
+ "[no] ipv6 mld robustness ![(1-7)]",
NO_STR
IPV6_STR
IFACE_MLD_STR
- IFACE_MLD_LAST_MEMBER_QUERY_COUNT_STR
- IGNORED_IN_NO_STR)
+ "MLD Robustness variable\n"
+ "MLD Robustness variable\n")
{
- return gm_process_no_last_member_query_count_cmd(vty);
+ if (no)
+ return gm_process_no_last_member_query_count_cmd(vty);
+ return gm_process_last_member_query_count_cmd(vty, robustness_str);
}
DEFPY (interface_ipv6_mld_last_member_query_interval,
interface_ipv6_mld_last_member_query_interval_cmd,
- "ipv6 mld last-member-query-interval (1-65535)$lmqi",
- IPV6_STR
- IFACE_MLD_STR
- IFACE_MLD_LAST_MEMBER_QUERY_INTERVAL_STR
- "Last member query interval in deciseconds\n")
-{
- return gm_process_last_member_query_interval_cmd(vty, lmqi_str);
-}
-
-DEFPY (interface_no_ipv6_mld_last_member_query_interval,
- interface_no_ipv6_mld_last_member_query_interval_cmd,
- "no ipv6 mld last-member-query-interval [(1-65535)]",
+ "[no] ipv6 mld last-member-query-interval ![(1-65535)$lmqi]",
NO_STR
IPV6_STR
IFACE_MLD_STR
IFACE_MLD_LAST_MEMBER_QUERY_INTERVAL_STR
- IGNORED_IN_NO_STR)
+ "Last member query interval in milliseconds\n")
{
- return gm_process_no_last_member_query_interval_cmd(vty);
+ if (no)
+ return gm_process_no_last_member_query_interval_cmd(vty);
+ return gm_process_last_member_query_interval_cmd(vty, lmqi_str);
}
DEFPY (show_ipv6_pim_rp,
install_element(VRF_NODE, &ipv6_mld_group_watermark_cmd);
install_element(CONFIG_NODE, &no_ipv6_mld_group_watermark_cmd);
install_element(VRF_NODE, &no_ipv6_mld_group_watermark_cmd);
+
install_element(INTERFACE_NODE,
&interface_ipv6_mld_query_max_response_time_cmd);
install_element(INTERFACE_NODE,
- &interface_no_ipv6_mld_query_max_response_time_cmd);
- install_element(INTERFACE_NODE,
- &interface_ipv6_mld_last_member_query_count_cmd);
- install_element(INTERFACE_NODE,
- &interface_no_ipv6_mld_last_member_query_count_cmd);
+ &interface_ipv6_mld_robustness_cmd);
install_element(INTERFACE_NODE,
&interface_ipv6_mld_last_member_query_interval_cmd);
- install_element(INTERFACE_NODE,
- &interface_no_ipv6_mld_last_member_query_interval_cmd);
install_element(VIEW_NODE, &show_ipv6_pim_rp_cmd);
install_element(VIEW_NODE, &show_ipv6_pim_rp_vrf_all_cmd);
gm_ifp->cur_version = GM_MLDV2;
/* hardcoded for dev without CLI */
- gm_ifp->cur_qrv = 2;
+ gm_ifp->cur_qrv = pim_ifp->gm_default_robustness_variable;
gm_ifp->cur_query_intv = pim_ifp->gm_default_query_interval * 1000;
- gm_ifp->cur_query_intv_trig = gm_ifp->cur_query_intv;
- gm_ifp->cur_max_resp = 250;
+ gm_ifp->cur_query_intv_trig = pim_ifp->mld_last_query_intv;
+ gm_ifp->cur_max_resp = pim_ifp->mld_max_resp_ms;
gm_ifp->cfg_timing_fuzz.tv_sec = 0;
gm_ifp->cfg_timing_fuzz.tv_usec = 10 * 1000;
if (IPV6_ADDR_CMP(&pim_ifp->ll_lowest, &gm_ifp->cur_ll_lowest))
gm_update_ll(ifp);
+ /* these don't trigger a new query */
+ gm_ifp->cur_query_intv_trig = pim_ifp->mld_last_query_intv;
+ gm_ifp->cur_max_resp = pim_ifp->mld_max_resp_ms;
+
unsigned cfg_query_intv = pim_ifp->gm_default_query_interval * 1000;
if (gm_ifp->cur_query_intv != cfg_query_intv) {
gm_ifp->cur_query_intv = cfg_query_intv;
- gm_ifp->cur_query_intv_trig = cfg_query_intv;
+ changed = true;
+ }
+
+ if (gm_ifp->cur_qrv != pim_ifp->gm_default_robustness_variable) {
+ gm_ifp->cur_qrv = pim_ifp->gm_default_robustness_variable;
changed = true;
}
int lib_interface_gmp_address_family_query_max_response_time_modify(
struct nb_cb_modify_args *args)
{
-#if PIM_IPV == 4
struct interface *ifp;
+#if PIM_IPV == 4
int query_max_response_time_dsec;
switch (args->event) {
query_max_response_time_dsec);
}
#else
- /* TBD Depends on MLD data structure changes */
-#endif
+ struct pim_interface *pim_ifp;
+ int max_resp_ms;
+ switch (args->event) {
+ case NB_EV_VALIDATE:
+ case NB_EV_PREPARE:
+ case NB_EV_ABORT:
+ break;
+ case NB_EV_APPLY:
+ pim_ifp = pim_ifp_get(args->dnode, NULL, &ifp);
+ max_resp_ms = yang_dnode_get_uint16(args->dnode, NULL);
+ pim_ifp->mld_max_resp_ms = max_resp_ms;
+ gm_ifp_update(ifp);
+ break;
+ }
+#endif
return NB_OK;
}
int lib_interface_gmp_address_family_last_member_query_interval_modify(
struct nb_cb_modify_args *args)
{
-#if PIM_IPV == 4
struct interface *ifp;
struct pim_interface *pim_ifp;
+#if PIM_IPV == 4
int last_member_query_interval;
switch (args->event) {
break;
}
#else
- /* TBD Depends on MLD data structure changes */
-#endif
+ int last_query_intv;
+
+ switch (args->event) {
+ case NB_EV_VALIDATE:
+ case NB_EV_PREPARE:
+ case NB_EV_ABORT:
+ break;
+ case NB_EV_APPLY:
+ pim_ifp = pim_ifp_get(args->dnode, NULL, &ifp);
+ last_query_intv = yang_dnode_get_uint16(args->dnode, NULL);
+ pim_ifp->mld_last_query_intv = last_query_intv;
+ gm_ifp_update(ifp);
+ break;
+ }
+#endif
return NB_OK;
}
int lib_interface_gmp_address_family_robustness_variable_modify(
struct nb_cb_modify_args *args)
{
-#if PIM_IPV == 4
struct interface *ifp;
struct pim_interface *pim_ifp;
+
+#if PIM_IPV == 4
int last_member_query_count;
switch (args->event) {
break;
}
#else
- /* TBD Depends on MLD data structure changes */
+ int robustness;
+
+ switch (args->event) {
+ case NB_EV_VALIDATE:
+ case NB_EV_PREPARE:
+ case NB_EV_ABORT:
+ break;
+ case NB_EV_APPLY:
+ pim_ifp = pim_ifp_get(args->dnode, NULL, &ifp);
+
+ robustness = yang_dnode_get_uint8(args->dnode, NULL);
+ pim_ifp->gm_default_robustness_variable = robustness;
+ pim_ifp->gm_last_member_query_count = robustness;
+ gm_ifp_update(ifp);
+ break;
+ }
#endif
return NB_OK;