diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-08-14 15:06:30 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-08-17 09:43:06 -0400 |
| commit | 6349e49645c2845beddc3a9a7a56b6123bfa2c89 (patch) | |
| tree | 7fdb0fa2dda144cddae6561eb8da4b100d8bc2fc /zebra/zebra_dplane.c | |
| parent | 77014daf3a88f4a4e2874db93e4b3915937f20ee (diff) | |
zebra: Fix crashes in interface change
Upon some internal testing some crashes were found. This fixes
the several crashes and normalizes the code to be closer in
it's execution pre and post changes to use the data plane.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_dplane.c')
| -rw-r--r-- | zebra/zebra_dplane.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index e527d93610..7b2f643080 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -197,6 +197,8 @@ struct dplane_intf_info { bool startup; uint8_t family; struct zebra_vxlan_vni_array *vniarray; + bool no_bvinfo_avail; + bool no_afspec_avail; struct zebra_dplane_bridge_vlan_info bvinfo; struct zebra_dplane_bridge_vlan_info_array *bvarray; @@ -1355,6 +1357,34 @@ dplane_ctx_get_ifp_vxlan_vni_array(const struct zebra_dplane_ctx *ctx) return ctx->u.intf.vniarray; } +void dplane_ctx_set_ifp_no_afspec(struct zebra_dplane_ctx *ctx) +{ + DPLANE_CTX_VALID(ctx); + + ctx->u.intf.no_afspec_avail = true; +} + +bool dplane_ctx_get_ifp_no_afspec(const struct zebra_dplane_ctx *ctx) +{ + DPLANE_CTX_VALID(ctx); + + return ctx->u.intf.no_afspec_avail; +} + +void dplane_ctx_set_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx) +{ + DPLANE_CTX_VALID(ctx); + + ctx->u.intf.no_bvinfo_avail = true; +} + +bool dplane_ctx_get_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx) +{ + DPLANE_CTX_VALID(ctx); + + return ctx->u.intf.no_bvinfo_avail; +} + void dplane_ctx_set_ifp_bridge_vlan_info( struct zebra_dplane_ctx *ctx, struct zebra_dplane_bridge_vlan_info *bvinfo) |
