diff options
author | Patrick Ruddy <pat@voltanet.io> | 2020-10-26 11:12:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 11:12:54 +0100 |
commit | d7bd0c043c6f5cf9f4c58c7006ebda2bfe6ced6a (patch) | |
tree | 2b647c79d4c944725cc098274060f6c7116d9153 /zebra/zebra_evpn_mh.c | |
parent | Merge pull request #7194 from qlyoung/tracing (diff) | |
parent | zebra: fix double clearing of zif->es_info.es (diff) | |
download | frr-d7bd0c043c6f5cf9f4c58c7006ebda2bfe6ced6a.tar.xz frr-d7bd0c043c6f5cf9f4c58c7006ebda2bfe6ced6a.zip |
Merge pull request #7217 from AnuradhaKaruppiah/fix-es-del-regression
zebra: fix double clearing of zif->es_info.es
Diffstat (limited to 'zebra/zebra_evpn_mh.c')
-rw-r--r-- | zebra/zebra_evpn_mh.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index dad019731..7dbe74e42 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -810,6 +810,7 @@ void zebra_evpn_if_init(struct zebra_if *zif) void zebra_evpn_if_cleanup(struct zebra_if *zif) { vlanid_t vid; + struct zebra_evpn_es *es; if (!bf_is_inited(zif->vlan_bitmap)) return; @@ -821,8 +822,9 @@ void zebra_evpn_if_cleanup(struct zebra_if *zif) bf_free(zif->vlan_bitmap); /* Delete associated Ethernet Segment */ - if (zif->es_info.es) - zebra_evpn_local_es_del(&zif->es_info.es); + es = zif->es_info.es; + if (es) + zebra_evpn_local_es_del(&es); } /***************************************************************************** @@ -1450,7 +1452,7 @@ static int zebra_evpn_local_es_update(struct zebra_if *zif, uint32_t lid, if (!lid || is_zero_mac(sysmac)) { /* if in ES is attached to zif delete it */ if (old_es) - zebra_evpn_local_es_del(&zif->es_info.es); + zebra_evpn_local_es_del(&old_es); return 0; } @@ -1475,7 +1477,7 @@ static int zebra_evpn_local_es_update(struct zebra_if *zif, uint32_t lid, /* release the old_es against the zif */ if (old_es) - zebra_evpn_local_es_del(&zif->es_info.es); + zebra_evpn_local_es_del(&old_es); es = zebra_evpn_es_find(&esi); if (es) { |