From: Anuradha Karuppiah Date: Fri, 15 Mar 2019 16:13:42 +0000 (-0700) Subject: zebra: EVPN DAD trigger was causing zebra to crash X-Git-Tag: 7.1_pulled~169^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d346c2e955ced1b7f579662365bf69cee4c2078c;p=matthieu%2Ffrr.git zebra: EVPN DAD trigger was causing zebra to crash Duplicate address detection and recovery was relying on the l2-vni backptr in the neighbor entry which was simply not initialized resulting in a NULL pointer access in a setup with dup-addressed VMs - VM1:{IP1,M1} and VM2:{IP1,M2} Call stack: (gdb) bt 6 at lib/sigevent.c:249 nbr=nbr@entry=0x559347f901d0, vtep_ip=..., vtep_ip@entry=..., do_dad=do_dad@entry=true, is_dup_detect=is_dup_detect@entry=0x7ffc7f6be59f, is_local=is_local@entry=true) at ./lib/ipaddr.h:86 ip=0x7ffc7f6be6f0, ifp=0x559347f901d0, zvni=0x559347f86800) at zebra/zebra_vxlan.c:3152 (More stack frames follow...) (gdb) p nbr->zvni $8 = (zebra_vni_t *) 0x0 <<<<<<<<<<<<<<<<<<<< (gdb) Signed-off-by: Anuradha Karuppiah --- diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 00fc230851..b44c314d5b 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2190,6 +2190,7 @@ static zebra_neigh_t *zvni_neigh_add(zebra_vni_t *zvni, struct ipaddr *ip, memcpy(&n->emac, mac, ETH_ALEN); n->state = ZEBRA_NEIGH_INACTIVE; + n->zvni = zvni; /* Associate the neigh to mac */ zmac = zvni_mac_lookup(zvni, mac);