diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-04-26 15:47:39 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-05-05 16:08:06 +0200 |
commit | ec64a634c2a49efc211994c9d7d9f015cc6739a3 (patch) | |
tree | 4f8428b7c86c09f53b4823b1b8774c3eb3216071 /zebra/zebra_vrf.c | |
parent | Merge pull request #8619 from donaldsharp/sharp_redistribute (diff) | |
download | frr-ec64a634c2a49efc211994c9d7d9f015cc6739a3.tar.xz frr-ec64a634c2a49efc211994c9d7d9f015cc6739a3.zip |
zebra: Allow the zvrf to know it's vrf when allocing
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r-- | zebra/zebra_vrf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 212557423..a0c63e420 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -103,9 +103,7 @@ static int zebra_vrf_new(struct vrf *vrf) if (IS_ZEBRA_DEBUG_EVENT) zlog_debug("VRF %s created, id %u", vrf->name, vrf->vrf_id); - zvrf = zebra_vrf_alloc(); - vrf->info = zvrf; - zvrf->vrf = vrf; + zvrf = zebra_vrf_alloc(vrf); if (!vrf_is_backend_netns()) zvrf->zns = zebra_ns_lookup(NS_DEFAULT); @@ -427,12 +425,15 @@ static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi, } /* Allocate new zebra VRF. */ -struct zebra_vrf *zebra_vrf_alloc(void) +struct zebra_vrf *zebra_vrf_alloc(struct vrf *vrf) { struct zebra_vrf *zvrf; zvrf = XCALLOC(MTYPE_ZEBRA_VRF, sizeof(struct zebra_vrf)); + zvrf->vrf = vrf; + vrf->info = zvrf; + zebra_vxlan_init_tables(zvrf); zebra_mpls_init_tables(zvrf); zebra_pw_init(zvrf); |