diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-05-26 06:49:56 -0700 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2020-12-01 09:46:28 -0800 |
| commit | 46bf266c1ccaa3d587de197f4975840922c2e18c (patch) | |
| tree | 9a99f4afa365af17b43fec26352e32e6cfc9f5d8 /zebra/zebra_evpn_mac.c | |
| parent | 4f9bb78eca97fdb86e80b11f9234ac9b9786e235 (diff) | |
zebra: debug logs to detect incorrect mac deletions
A MAC entry cannot be deleted while a neigh is referencing it. It seems
there is some race condition where this may be happening. The log is
to help identify those cases.
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_evpn_mac.c')
| -rw-r--r-- | zebra/zebra_evpn_mac.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c index 0b0670f079..44394b95aa 100644 --- a/zebra/zebra_evpn_mac.c +++ b/zebra/zebra_evpn_mac.c @@ -1005,6 +1005,14 @@ int zebra_evpn_mac_del(zebra_evpn_t *zevpn, zebra_mac_t *mac) mac->flags); } + /* If the MAC is freed before the neigh we will end up + * with a stale pointer against the neigh + */ + if (!list_isempty(mac->neigh_list)) + zlog_warn("%s: MAC %pEA flags 0x%x neigh list not empty %d", + __func__, &mac->macaddr, mac->flags, + listcount(mac->neigh_list)); + /* force de-ref any ES entry linked to the MAC */ zebra_evpn_es_mac_deref_entry(mac); |
