From ccf696e85ff182fa01a9f92bc17506b6ef1e5910 Mon Sep 17 00:00:00 2001 From: saravanank Date: Sun, 15 Mar 2020 22:42:56 -0700 Subject: 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 --- pimd/pim_instance.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pimd/pim_instance.h') diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h index 7b1fd2e172..cd6c4d7f5c 100644 --- a/pimd/pim_instance.h +++ b/pimd/pim_instance.h @@ -165,6 +165,7 @@ struct pim_instance { struct route_table *rp_table; int iface_vif_index[MAXVIFS]; + int mcast_if_count; struct rb_pim_oil_head channel_oil_head; -- cgit v1.2.3