diff options
author | anlan_cs <vic.lan@pica8.com> | 2024-08-15 14:49:24 +0200 |
---|---|---|
committer | anlan_cs <anlan_cs@tom.com> | 2024-08-16 16:33:59 +0200 |
commit | cbe50989d94c549de23e35f15121321fe56fd40e (patch) | |
tree | 07bd16ca6ffad231793bd8313350f18909c12c31 /pimd | |
parent | Merge pull request #16585 from pguibert6WIND/prd_pretty_mt_fix (diff) | |
download | frr-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.c | 5 |
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( |