mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 13:31:48 +00:00
Merge pull request #11581 from AbhishekNR/mld_hardcode_value
pim6d: Completing mld config commands.
This commit is contained in:
commit
6a501480c2
@ -195,7 +195,7 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
|
||||
Set the MLD last member query count. The default value is 2. 'no' form of
|
||||
this command is used to configure back to the default value.
|
||||
|
||||
.. clicmd:: ipv6 MLD last-member-query-interval (1-65535)
|
||||
.. clicmd:: ipv6 mld last-member-query-interval (1-65535)
|
||||
|
||||
Set the MLD last member query interval in deciseconds. The default value is
|
||||
10 deciseconds. 'no' form of this command is used to to configure back to the
|
||||
|
@ -418,7 +418,7 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
|
||||
gm_sg_timer_start(gm_ifp, sg, timers.expire_wait);
|
||||
|
||||
THREAD_OFF(sg->t_sg_query);
|
||||
sg->n_query = gm_ifp->cur_qrv;
|
||||
sg->n_query = gm_ifp->cur_lmqc;
|
||||
sg->query_sbit = false;
|
||||
gm_trigger_specific(sg);
|
||||
}
|
||||
@ -2091,11 +2091,12 @@ static void gm_start(struct interface *ifp)
|
||||
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_query_intv_trig =
|
||||
pim_ifp->gm_specific_query_max_response_time_dsec * 100;
|
||||
gm_ifp->cur_max_resp = pim_ifp->gm_query_max_response_time_dsec * 100;
|
||||
gm_ifp->cur_lmqc = pim_ifp->gm_last_member_query_count;
|
||||
|
||||
gm_ifp->cfg_timing_fuzz.tv_sec = 0;
|
||||
gm_ifp->cfg_timing_fuzz.tv_usec = 10 * 1000;
|
||||
@ -2268,10 +2269,26 @@ void gm_ifp_update(struct interface *ifp)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
unsigned int cfg_query_intv_trig =
|
||||
pim_ifp->gm_specific_query_max_response_time_dsec * 100;
|
||||
|
||||
if (gm_ifp->cur_query_intv_trig != cfg_query_intv_trig) {
|
||||
gm_ifp->cur_query_intv_trig = cfg_query_intv_trig;
|
||||
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;
|
||||
|
||||
if (gm_ifp->cur_lmqc != pim_ifp->gm_last_member_query_count)
|
||||
gm_ifp->cur_lmqc = pim_ifp->gm_last_member_query_count;
|
||||
|
||||
enum gm_version cfg_version;
|
||||
|
||||
if (pim_ifp->mld_version == 1)
|
||||
|
@ -324,6 +324,7 @@ struct gm_if {
|
||||
unsigned int cur_query_intv_trig; /* ms */
|
||||
unsigned int cur_max_resp; /* ms */
|
||||
enum gm_version cur_version;
|
||||
int cur_lmqc; /* last member query count in ds */
|
||||
|
||||
/* this value (positive, default 10ms) defines our "timing tolerance":
|
||||
* - added to deadlines for expiring joins
|
||||
|
@ -454,14 +454,17 @@ static void change_query_interval(struct pim_interface *pim_ifp,
|
||||
}
|
||||
#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)
|
||||
@ -469,6 +472,9 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
|
||||
|
||||
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
|
||||
@ -501,8 +507,8 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
|
||||
igmp_source_reset_gmi(grp, src);
|
||||
}
|
||||
}
|
||||
#endif /* PIM_IPV == 4 */
|
||||
}
|
||||
#endif
|
||||
|
||||
int routing_control_plane_protocols_name_validate(
|
||||
struct nb_cb_create_args *args)
|
||||
@ -2797,7 +2803,6 @@ int lib_interface_gmp_address_family_query_interval_modify(
|
||||
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;
|
||||
|
||||
@ -2810,13 +2815,9 @@ int lib_interface_gmp_address_family_query_max_response_time_modify(
|
||||
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;
|
||||
}
|
||||
@ -2827,7 +2828,6 @@ int lib_interface_gmp_address_family_query_max_response_time_modify(
|
||||
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;
|
||||
int last_member_query_interval;
|
||||
@ -2847,9 +2847,6 @@ int lib_interface_gmp_address_family_last_member_query_interval_modify(
|
||||
|
||||
break;
|
||||
}
|
||||
#else
|
||||
/* TBD Depends on MLD data structure changes */
|
||||
#endif
|
||||
|
||||
return NB_OK;
|
||||
}
|
||||
@ -2860,7 +2857,6 @@ int lib_interface_gmp_address_family_last_member_query_interval_modify(
|
||||
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;
|
||||
int last_member_query_count;
|
||||
@ -2879,9 +2875,6 @@ int lib_interface_gmp_address_family_robustness_variable_modify(
|
||||
|
||||
break;
|
||||
}
|
||||
#else
|
||||
/* TBD Depends on MLD data structure changes */
|
||||
#endif
|
||||
|
||||
return NB_OK;
|
||||
}
|
||||
|
@ -378,9 +378,29 @@ static int gm_config_write(struct vty *vty, int writes,
|
||||
|
||||
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);
|
||||
|
||||
/* IF ipv6 mld last-member_query-count */
|
||||
if (pim_ifp->gm_last_member_query_count !=
|
||||
IGMP_DEFAULT_ROBUSTNESS_VARIABLE)
|
||||
vty_out(vty, " ipv6 mld last-member-query-count %d\n",
|
||||
pim_ifp->gm_last_member_query_count);
|
||||
|
||||
/* IF ipv6 mld last-member_query-interval */
|
||||
if (pim_ifp->gm_specific_query_max_response_time_dsec !=
|
||||
IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC)
|
||||
vty_out(vty, " ipv6 mld last-member-query-interval %d\n",
|
||||
pim_ifp->gm_specific_query_max_response_time_dsec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user