]> git.proxmox.com Git - mirror_frr.git/commit
pim6d: Fix crash in ipv6 pim command
authorSarita Patra <saritap@vmware.com>
Fri, 5 May 2023 17:52:33 +0000 (10:52 -0700)
committerSarita Patra <saritap@vmware.com>
Tue, 30 May 2023 07:43:45 +0000 (00:43 -0700)
commit6d1d2c27a318bbcc9b5b77d73642e3d1f6d72ac2
treec8a95a61c8b517aab03a5eab0adc2708413a1786
parent2fccc9fa10d94a1f8b434e1dec06bee3ac352245
pim6d: Fix crash in ipv6 pim command

Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: #13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
pimd/pim_nb_config.c