From 14c7ac504fef5193383611cf1e3d162e7d29c636 Mon Sep 17 00:00:00 2001 From: Mobashshera Rasool Date: Thu, 21 Apr 2022 03:01:33 -0700 Subject: [PATCH] pimd: Set new to true in igmp_get_source_by_addr api 5421bf8 commit forgot to set the parameter "new" to true when a new source is created, have fixed it. igmp_get_source_by_addr api is currently setting the parameter "new" to false always. This is not right. The caller apis are using this field to decide and based on that take actions to create timers, etc. Its need to be set to true when a new source is created. Signed-off-by: Mobashshera Rasool --- pimd/pim_igmpv3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index 933b43cd98..5d46383a8e 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -465,6 +465,9 @@ struct gm_source *igmp_get_source_by_addr(struct gm_group *group, src = XCALLOC(MTYPE_PIM_IGMP_GROUP_SOURCE, sizeof(*src)); + if (new) + *new = true; + src->t_source_timer = NULL; src->source_group = group; /* back pointer */ src->source_addr = src_addr; -- 2.39.5