else
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_max_resp = pim_ifp->gm_query_max_response_time_dsec * 100;
gm_ifp->cfg_timing_fuzz.tv_sec = 0;
gm_ifp->cfg_timing_fuzz.tv_usec = 10 * 1000;
changed = true;
}
+ unsigned int cfg_max_response =
+ pim_ifp->gm_query_max_response_time_dsec * 100;
+
+ if (gm_ifp->cur_max_resp != cfg_max_response)
+ gm_ifp->cur_max_resp = cfg_max_response;
+
enum gm_version cfg_version;
if (pim_ifp->mld_version == 1)
}
#endif
-#if PIM_IPV == 4
-static void change_query_max_response_time(struct pim_interface *pim_ifp,
- int query_max_response_time_dsec)
+static void change_query_max_response_time(struct interface *ifp,
+ int query_max_response_time_dsec)
{
+#if PIM_IPV == 4
struct listnode *sock_node;
struct gm_sock *igmp;
struct listnode *grp_node;
struct gm_group *grp;
+#endif
+
+ struct pim_interface *pim_ifp = ifp->info;
if (pim_ifp->gm_query_max_response_time_dsec ==
query_max_response_time_dsec)
pim_ifp->gm_query_max_response_time_dsec = query_max_response_time_dsec;
+#if PIM_IPV == 6
+ gm_ifp_update(ifp);
+#else
/*
* Below we modify socket/group/source timers in order to quickly
* reflect the change. Otherwise, those timers would args->eventually
igmp_source_reset_gmi(grp, src);
}
}
+#endif /* PIM_IPV == 4 */
}
-#endif
int routing_control_plane_protocols_name_validate(
struct nb_cb_create_args *args)
int lib_interface_gmp_address_family_query_max_response_time_modify(
struct nb_cb_modify_args *args)
{
-#if PIM_IPV == 4
struct interface *ifp;
int query_max_response_time_dsec;
ifp = nb_running_get_entry(args->dnode, NULL, true);
query_max_response_time_dsec =
yang_dnode_get_uint16(args->dnode, NULL);
- change_query_max_response_time(ifp->info,
- query_max_response_time_dsec);
+ change_query_max_response_time(ifp,
+ query_max_response_time_dsec);
}
-#else
- /* TBD Depends on MLD data structure changes */
-#endif
-
return NB_OK;
}
if (pim_ifp->mld_version != MLD_DEFAULT_VERSION)
vty_out(vty, " ipv6 mld version %d\n", pim_ifp->mld_version);
+
+ /* IF ipv6 mld query-max-response-time */
+ if (pim_ifp->gm_query_max_response_time_dsec !=
+ IGMP_QUERY_MAX_RESPONSE_TIME_DSEC)
+ vty_out(vty, " ipv6 mld query-max-response-time %d\n",
+ pim_ifp->gm_query_max_response_time_dsec);
+
if (pim_ifp->gm_default_query_interval != IGMP_GENERAL_QUERY_INTERVAL)
vty_out(vty, " ipv6 mld query-interval %d\n",
pim_ifp->gm_default_query_interval);