summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2024-08-15 14:49:24 +0200
committeranlan_cs <anlan_cs@tom.com>2024-08-16 16:33:59 +0200
commitcbe50989d94c549de23e35f15121321fe56fd40e (patch)
tree07bd16ca6ffad231793bd8313350f18909c12c31 /pimd
parentMerge pull request #16585 from pguibert6WIND/prd_pretty_mt_fix (diff)
downloadfrr-cbe50989d94c549de23e35f15121321fe56fd40e.tar.xz
frr-cbe50989d94c549de23e35f15121321fe56fd40e.zip
pimd: fix missing checking the return value for igmp command
`gm_join_new()` will return NULL in the case of running out of socket/file resources. Just add the check for it. Signed-off-by: anlan_cs <anlan_cs@tom.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_iface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index dcb611601..cdcca0ebe 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -1322,7 +1322,10 @@ ferr_r pim_if_gm_join_add(struct interface *ifp, pim_addr group_addr,
return ferr_ok();
}
- (void)gm_join_new(ifp, group_addr, source_addr);
+ if (!gm_join_new(ifp, group_addr, source_addr)) {
+ return ferr_cfg_invalid("can't join (%pPA,%pPA) on interface %s",
+ &source_addr, &group_addr, ifp->name);
+ }
if (PIM_DEBUG_GM_EVENTS) {
zlog_debug(