summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:46 +0000
commit4f40546c96c6aeaa4371161dca9db21071bcc5d2 (patch)
tree41199f3c71bb1b62bdee8e83577351f6ee70d031 /pimd
parentAdding upstream version 10.0. (diff)
downloadfrr-fc51517efcb36afb45360829ae5850fa89b04ec5.tar.xz
frr-fc51517efcb36afb45360829ae5850fa89b04ec5.zip
Adding upstream version 10.0.1.upstream/10.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--pimd/pim6_cmd.c4
-rw-r--r--pimd/pim_cmd.c4
-rw-r--r--pimd/pim_cmd_common.c11
-rw-r--r--pimd/pim_ifchannel.c8
-rw-r--r--pimd/pim_igmpv3.c2
-rw-r--r--pimd/pim_register.c4
-rw-r--r--pimd/pim_upstream.c65
-rw-r--r--pimd/pim_upstream.h3
8 files changed, 69 insertions, 32 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 4db1157..ec91270 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -244,7 +244,7 @@ DEFPY (interface_no_ipv6_pim,
DEFPY (interface_ipv6_pim_drprio,
interface_ipv6_pim_drprio_cmd,
- "ipv6 pim drpriority (1-4294967295)",
+ "ipv6 pim drpriority (0-4294967295)",
IPV6_STR
PIM_STR
"Set the Designated Router Election Priority\n"
@@ -255,7 +255,7 @@ DEFPY (interface_ipv6_pim_drprio,
DEFPY (interface_no_ipv6_pim_drprio,
interface_no_ipv6_pim_drprio_cmd,
- "no ipv6 pim drpriority [(1-4294967295)]",
+ "no ipv6 pim drpriority [(0-4294967295)]",
NO_STR
IPV6_STR
PIM_STR
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index be36a07..c3528e2 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -3953,7 +3953,7 @@ DEFUN (interface_no_ip_igmp_last_member_query_interval,
DEFUN (interface_ip_pim_drprio,
interface_ip_pim_drprio_cmd,
- "ip pim drpriority (1-4294967295)",
+ "ip pim drpriority (0-4294967295)",
IP_STR
PIM_STR
"Set the Designated Router Election Priority\n"
@@ -3966,7 +3966,7 @@ DEFUN (interface_ip_pim_drprio,
DEFUN (interface_no_ip_pim_drprio,
interface_no_ip_pim_drprio_cmd,
- "no ip pim drpriority [(1-4294967295)]",
+ "no ip pim drpriority [(0-4294967295)]",
NO_STR
IP_STR
PIM_STR
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c
index ee318d4..5e50a09 100644
--- a/pimd/pim_cmd_common.c
+++ b/pimd/pim_cmd_common.c
@@ -287,8 +287,15 @@ int pim_process_no_rp_kat_cmd(struct vty *vty)
sizeof(rs_timer_xpath));
/* RFC4601 */
- v = yang_dnode_get_uint16(vty->candidate_config->dnode, "%s",
- rs_timer_xpath);
+ /* Check if register suppress time is configured or assigned
+ * the default register suppress time.
+ */
+ if (yang_dnode_exists(vty->candidate_config->dnode, rs_timer_xpath))
+ v = yang_dnode_get_uint16(vty->candidate_config->dnode, "%s",
+ rs_timer_xpath);
+ else
+ v = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
+
v = 3 * v + PIM_REGISTER_PROBE_TIME_DEFAULT;
if (v > UINT16_MAX)
v = UINT16_MAX;
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index da55189..8f9e410 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -342,6 +342,13 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch,
ch->sg_str, ch->interface->name);
}
+ /* pim_upstream_update_join_desired looks at up->channel_oil,
+ * but that's updated from pim_forward_stop(). Need this here
+ * so we correctly determine join_desired right below.
+ */
+ if (new_state == PIM_IFJOIN_NOINFO)
+ pim_forward_stop(ch);
+
/*
Record uptime of state transition to/from NOINFO
*/
@@ -619,7 +626,6 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp, pim_sgaddr *sg,
static void ifjoin_to_noinfo(struct pim_ifchannel *ch)
{
pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_NOINFO);
- pim_forward_stop(ch);
PIM_UPSTREAM_FLAG_UNSET_SRC_PIM(ch->upstream->flags);
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index 18a9fb7..2c5ad4d 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -457,8 +457,6 @@ struct gm_source *igmp_get_source_by_addr(struct gm_group *group,
listnode_add(group->group_source_list, src);
- /* Any source (*,G) is forwarded only if mode is EXCLUDE {empty} */
- igmp_anysource_forward_stop(group);
return src;
}
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 01da699..b149b5a 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -109,12 +109,12 @@ static void pim_reg_stop_upstream(struct pim_instance *pim,
up->reg_state = PIM_REG_PRUNE;
pim_channel_del_oif(up->channel_oil, pim->regiface,
PIM_OIF_FLAG_PROTO_PIM, __func__);
- pim_upstream_start_register_stop_timer(up, 0);
+ pim_upstream_start_register_probe_timer(up);
pim_vxlan_update_sg_reg_state(pim, up, false);
break;
case PIM_REG_JOIN_PENDING:
up->reg_state = PIM_REG_PRUNE;
- pim_upstream_start_register_stop_timer(up, 0);
+ pim_upstream_start_register_probe_timer(up);
return;
}
}
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 556d25b..7417f31 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -1687,6 +1687,8 @@ const char *pim_reg_state2str(enum pim_reg_state reg_state, char *state_str,
return state_str;
}
+static void pim_upstream_start_register_stop_timer(struct pim_upstream *up);
+
static void pim_upstream_register_stop_timer(struct event *t)
{
struct pim_interface *pim_ifp;
@@ -1734,7 +1736,7 @@ static void pim_upstream_register_stop_timer(struct event *t)
return;
}
up->reg_state = PIM_REG_JOIN_PENDING;
- pim_upstream_start_register_stop_timer(up, 1);
+ pim_upstream_start_register_stop_timer(up);
if (((up->channel_oil->cc.lastused / 100)
> pim->keep_alive_time)
@@ -1752,34 +1754,59 @@ static void pim_upstream_register_stop_timer(struct event *t)
}
}
-void pim_upstream_start_register_stop_timer(struct pim_upstream *up,
- int null_register)
+static void pim_upstream_start_register_stop_timer(struct pim_upstream *up)
{
uint32_t time;
EVENT_OFF(up->t_rs_timer);
- if (!null_register) {
- uint32_t lower = (0.5 * router->register_suppress_time);
- uint32_t upper = (1.5 * router->register_suppress_time);
- time = lower + (frr_weak_random() % (upper - lower + 1));
- /* Make sure we don't wrap around */
- if (time >= router->register_probe_time)
- time -= router->register_probe_time;
- else
- time = 0;
- } else
- time = router->register_probe_time;
+ time = router->register_probe_time;
- if (PIM_DEBUG_PIM_TRACE) {
- zlog_debug(
- "%s: (S,G)=%s Starting upstream register stop timer %d",
- __func__, up->sg_str, time);
- }
+ if (PIM_DEBUG_PIM_TRACE)
+ zlog_debug("%s: (S,G)=%s Starting upstream register stop timer %d",
+ __func__, up->sg_str, time);
event_add_timer(router->master, pim_upstream_register_stop_timer, up,
time, &up->t_rs_timer);
}
+static void pim_upstream_register_probe_timer(struct event *t)
+{
+ struct pim_upstream *up = EVENT_ARG(t);
+
+ if (!up->rpf.source_nexthop.interface ||
+ !up->rpf.source_nexthop.interface->info) {
+ if (PIM_DEBUG_PIM_REG)
+ zlog_debug("cannot send Null register for %pSG, no path to RP",
+ &up->sg);
+ } else
+ pim_null_register_send(up);
+
+ pim_upstream_start_register_stop_timer(up);
+}
+
+void pim_upstream_start_register_probe_timer(struct pim_upstream *up)
+{
+ uint32_t time;
+
+ EVENT_OFF(up->t_rs_timer);
+
+ uint32_t lower = (0.5 * router->register_suppress_time);
+ uint32_t upper = (1.5 * router->register_suppress_time);
+ time = lower + (frr_weak_random() % (upper - lower + 1));
+ /* Make sure we don't wrap around */
+ if (time >= router->register_probe_time)
+ time -= router->register_probe_time;
+ else
+ time = 0;
+
+ if (PIM_DEBUG_PIM_TRACE)
+ zlog_debug("%s: (S,G)=%s Starting upstream register stop null probe timer %d",
+ __func__, up->sg_str, time);
+
+ event_add_timer(router->master, pim_upstream_register_probe_timer, up,
+ time, &up->t_rs_timer);
+}
+
int pim_upstream_inherited_olist_decide(struct pim_instance *pim,
struct pim_upstream *up)
{
diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h
index 62649cd..8b4a35b 100644
--- a/pimd/pim_upstream.h
+++ b/pimd/pim_upstream.h
@@ -331,8 +331,7 @@ int pim_upstream_is_sg_rpt(struct pim_upstream *up);
void pim_upstream_set_sptbit(struct pim_upstream *up,
struct interface *incoming);
-void pim_upstream_start_register_stop_timer(struct pim_upstream *up,
- int null_register);
+void pim_upstream_start_register_probe_timer(struct pim_upstream *up);
void pim_upstream_send_join(struct pim_upstream *up);