summaryrefslogtreecommitdiffstats
path: root/pimd/pim_ssm.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-05-12 20:31:45 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-05-12 20:36:59 +0200
commitd3cc1e45182196a0b9b7146bcbaef04f346d9721 (patch)
tree2841feca90eae72f58a1c0c3e23af860db3f3b46 /pimd/pim_ssm.c
parentpimd: There exists a path where on vrf bringup we do not create the pimreg (diff)
downloadfrr-d3cc1e45182196a0b9b7146bcbaef04f346d9721.tar.xz
frr-d3cc1e45182196a0b9b7146bcbaef04f346d9721.zip
pimd: Remove pim->vrf_id and use pim->vrf->vrf_id
VRF creation can happen from either cli or from knowledged about the vrf learned from zebra. In the case where we learn about the vrf from the cli, the vrf id is UNKNOWN. Upon actual creation of the vrf, lib/vrf.c touches up the vrf_id and calls pim_vrf_enable to turn it on properly. At this point in time we have a pim->vrf_id of UNKNOWN and the vrf->vrf_id of the right value. There is no point in duplicating this data. So just remove all pim->vrf_id and use the vrf->vrf_id instead since we keep a copy of the pim->vrf pointer. This will remove some crashes where we expect the pim->vrf_id to be usable and it's not. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_ssm.c')
-rw-r--r--pimd/pim_ssm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_ssm.c b/pimd/pim_ssm.c
index 8d3e04f5d..6c5883aeb 100644
--- a/pimd/pim_ssm.c
+++ b/pimd/pim_ssm.c
@@ -112,7 +112,7 @@ int pim_ssm_range_set(struct pim_instance *pim, vrf_id_t vrf_id,
struct pim_ssm *ssm;
int change = 0;
- if (vrf_id != pim->vrf_id)
+ if (vrf_id != pim->vrf->vrf_id)
return PIM_SSM_ERR_NO_VRF;
ssm = pim->ssm_info;