diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-28 23:49:13 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-28 23:52:39 +0200 |
commit | b9b794db212d10390f4c79ab866dd4ea645353e9 (patch) | |
tree | 2f301122f988e4e58160b87386c2db5b376469e1 /zebra/zebra_vrf.c | |
parent | Merge pull request #8326 from idryzhov/hide-show-config (diff) | |
download | frr-b9b794db212d10390f4c79ab866dd4ea645353e9.tar.xz frr-b9b794db212d10390f4c79ab866dd4ea645353e9.zip |
*: modify VRF_CONFIGURED flag only in VRF NB layer
This is to fix the crash reproduced by the following steps:
* ip link add red type vrf table 1
Creates VRF.
* vtysh -c "conf" -c "vrf red"
Creates VRF NB node and marks VRF as configured.
* ip route 1.1.1.0/24 2.2.2.2 vrf red
* no ip route 1.1.1.0/24 2.2.2.2 vrf red
(or similar l3vni set/unset in zebra)
Marks VRF as NOT configured.
* ip link del red
VRF is deleted, because it is marked as not configured, but NB node
stays.
Subsequent attempt to configure something in the VRF leads to a crash
because of the stale pointer in NB layer.
Fixes #8357.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r-- | zebra/zebra_vrf.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index b42923640..212557423 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -338,20 +338,6 @@ static int zebra_vrf_update(struct vrf *vrf) return 0; } - -/* Return if this VRF has any FRR configuration or not. - * IMPORTANT: This function needs to be updated when additional configuration - * is added for a VRF. - */ -int zebra_vrf_has_config(struct zebra_vrf *zvrf) -{ - /* EVPN L3-VNI? */ - if (zvrf->l3vni) - return 1; - - return 0; -} - /* Lookup the routing table in a VRF based on both VRF-Id and table-id. * NOTE: Table-id is relevant on two modes: * - case VRF backend is default : on default VRF only |