]> git.proxmox.com Git - mirror_frr.git/commit - pimd/pim_instance.h
pimd: Do not allow to configure multicast on more than MAXVIF interfaces
authorsaravanank <saravanank@vmware.com>
Mon, 16 Mar 2020 05:42:56 +0000 (22:42 -0700)
committersaravanank <saravanank@vmware.com>
Tue, 17 Mar 2020 02:49:18 +0000 (19:49 -0700)
commitccf696e85ff182fa01a9f92bc17506b6ef1e5910
tree736556b226ff12e23e47f7f1cd5cad3357d61856
parent7f2ccbe562cae49fb8bf1770a0ec79b701ee41af
pimd: Do not allow to configure multicast on more than MAXVIF interfaces

RCA: When configured more than 32(MAXVIS), the inerfaces that are configured
after 32nd interfaces have the value of MAXVIF.
This is used as index to access the free vif tracker of array size 32(MAXVIFS).
So the channel oil list pointer which is present as the next field in pim structure get corrupt, when updating free vif.
This gets accessed during rpf update resulting in crash.

Fix: Refrain from allocating mcast interface structure and throw config error when more than MAXVIFS are attempted to configure.
Max vif checks are exempted for vrf device and pimreg as vrf device will be the first interface and not expected to fail and pimreg has reserved vif.
vxlan tunnel termination device creation has this check and throw warning on max vif.
All other creation are through CLI.

Signed-off-by: Saravanan K <saravanank@vmware.com>
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_instance.c
pimd/pim_instance.h