]> git.puffer.fish Git - matthieu/frr.git/commit
pimd: Remove pim->vrf_id and use pim->vrf->vrf_id
authorDonald Sharp <sharpd@nvidia.com>
Wed, 12 May 2021 18:31:45 +0000 (14:31 -0400)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 10:18:41 +0000 (13:18 +0300)
commit934d62e9b25ebe5aa950f799fd4a487a7e6ae476
tree148c921cbb001984485cd4c3d2154c9fc1b9d586
parentbe01e62c4325973848f2039ce07660c72e8a021e
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>
18 files changed:
pimd/pim_bsm.c
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_igmp_mtrace.c
pimd/pim_instance.c
pimd/pim_instance.h
pimd/pim_mroute.c
pimd/pim_msdp_socket.c
pimd/pim_nb_config.c
pimd/pim_nht.c
pimd/pim_pim.c
pimd/pim_rp.c
pimd/pim_rpf.c
pimd/pim_ssm.c
pimd/pim_ssmpingd.c
pimd/pim_vty.c
pimd/pim_vxlan.c
pimd/pim_zlookup.c