]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: EVPN DAD trigger was causing zebra to crash
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 15 Mar 2019 16:13:42 +0000 (09:13 -0700)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 15 Mar 2019 16:29:25 +0000 (09:29 -0700)
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 <anuradhak@cumulusnetworks.com>
zebra/zebra_vxlan.c

index 00fc2308518fe3919e644ea8b7424efe479a31c7..b44c314d5bd18911cc22bb3e25c4f51d9e1cfe91 100644 (file)
@@ -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);