diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-05-03 20:39:47 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-05-12 20:08:07 +0200 |
commit | e5981db7e9eda027c189d3d528f7e02c05faf29a (patch) | |
tree | 737778482f0d5454fb5c627437a9b67a4d10d388 /pimd/pim_instance.c | |
parent | Merge pull request #8544 from donaldsharp/weird_stuff_in_topo (diff) | |
download | frr-e5981db7e9eda027c189d3d528f7e02c05faf29a.tar.xz frr-e5981db7e9eda027c189d3d528f7e02c05faf29a.zip |
pimd: There exists a path where on vrf bringup we do not create the pimreg
When creating configuration for a vrf *Before* the vrf has been
created, pim will not properly create the pimreg device and
we will promptly crash when we try to pass data.
Put some code checks in place to ensure that the pimreg is
created for vrf's.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_instance.c')
-rw-r--r-- | pimd/pim_instance.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c index 019048abf..a7048ecef 100644 --- a/pimd/pim_instance.c +++ b/pimd/pim_instance.c @@ -175,9 +175,18 @@ static int pim_vrf_delete(struct vrf *vrf) static int pim_vrf_enable(struct vrf *vrf) { struct pim_instance *pim = (struct pim_instance *)vrf->info; + struct interface *ifp; zlog_debug("%s: for %s", __func__, vrf->name); + FOR_ALL_INTERFACES (vrf, ifp) { + if (!ifp->info) + continue; + + pim_if_create_pimreg(pim); + break; + } + pim_mroute_socket_enable(pim); return 0; |