diff options
author | anlan_cs <vic.lan@pica8.com> | 2022-05-14 03:02:11 +0200 |
---|---|---|
committer | anlan_cs <vic.lan@pica8.com> | 2022-05-14 05:31:52 +0200 |
commit | 81157cbd10d3ebc6d3d31cb5617dadea1c98d454 (patch) | |
tree | fdfbbd9a17dfbc9c17ee1c34259529196cb1ef6e /zebra/zebra_nb_config.c | |
parent | Merge pull request #11198 from opensourcerouting/fix/show_ip_bgp_l2vpn_evpn_r... (diff) | |
download | frr-81157cbd10d3ebc6d3d31cb5617dadea1c98d454.tar.xz frr-81157cbd10d3ebc6d3d31cb5617dadea1c98d454.zip |
zebra: remove unnecessary check for "zevpn_vrf"
The global vrf in zebra is always non-NULL. In general, it is bound to
default vrf by `zebra_vrf_init()`, at other times bound to some specific
vrf. Anyway, non-NULL.
So remove all redundant checkings for the returned value of
`zebra_vrf_get_evpn()`.
Additionally, remove the unnecessary check for `zvrf` in
`zebra_vxlan_cleanup_tables()`.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'zebra/zebra_nb_config.c')
-rw-r--r-- | zebra/zebra_nb_config.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c index de94c2dfc..87356408d 100644 --- a/zebra/zebra_nb_config.c +++ b/zebra/zebra_nb_config.c @@ -1148,7 +1148,6 @@ int lib_vrf_zebra_l3vni_id_modify(struct nb_cb_modify_args *args) struct zebra_vrf *zvrf; vni_t vni = 0; struct zebra_l3vni *zl3vni = NULL; - struct zebra_vrf *zvrf_evpn = NULL; char err[ERR_STR_SZ]; bool pfx_only = false; const struct lyd_node *pn_dnode; @@ -1159,12 +1158,6 @@ int lib_vrf_zebra_l3vni_id_modify(struct nb_cb_modify_args *args) case NB_EV_ABORT: return NB_OK; case NB_EV_VALIDATE: - zvrf_evpn = zebra_vrf_get_evpn(); - if (!zvrf_evpn) { - snprintf(args->errmsg, args->errmsg_len, - "evpn vrf is not present."); - return NB_ERR_VALIDATION; - } vni = yang_dnode_get_uint32(args->dnode, NULL); /* Get vrf info from parent node, reject configuration * if zebra vrf already mapped to different vni id. |