Skip to content

Commit

Permalink
bgpd: Delete EVPN VRF instace if it's not a hidden instance only
Browse files Browse the repository at this point in the history
```
==5445==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ff4c6bedb19 bp 0x7ffc95f2e400 sp 0x7ffc95f2e3c0 T0)
==5445==The signal is caused by a READ memory access.
==5445==Hint: address points to the zero page.
    #0 0x7ff4c6bedb19 in hash_iterate lib/hash.c:246
    #1 0x5618f41f5f59 in bgp_evpn_nh_finish bgpd/bgp_evpn_mh.c:4663
    #2 0x5618f41dcbe8 in bgp_evpn_vrf_delete bgpd/bgp_evpn.c:7336
    #3 0x5618f43bdd35 in bgp_delete bgpd/bgpd.c:4098
    FRRouting#4 0x5618f417ef6e in bgp_exit bgpd/bgp_main.c:206
    FRRouting#5 0x5618f417ef6e in sigint bgpd/bgp_main.c:164
    FRRouting#6 0x7ff4c6cac6c4 in frr_sigevent_process lib/sigevent.c:117
    FRRouting#7 0x7ff4c6cd8258 in event_fetch lib/event.c:1767
    FRRouting#8 0x7ff4c6c0dcbc in frr_run lib/libfrr.c:1230
    FRRouting#9 0x5618f418080d in main bgpd/bgp_main.c:555
    FRRouting#10 0x7ff4c670c249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    FRRouting#11 0x7ff4c670c304 in __libc_start_main_impl ../csu/libc-start.c:360
    FRRouting#12 0x5618f417ea20 in _start (/usr/lib/frr/bgpd+0x2e4a20)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV lib/hash.c:246 in hash_iterate
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
  • Loading branch information
ton31337 committed Sep 23, 2024
1 parent ffa0fd5 commit bb977d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4095,7 +4095,8 @@ int bgp_delete(struct bgp *bgp)
}

/* unmap from RT list */
bgp_evpn_vrf_delete(bgp);
if (!IS_BGP_INSTANCE_HIDDEN(bgp))
bgp_evpn_vrf_delete(bgp);

/* unmap bgp vrf label */
vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP);
Expand Down

0 comments on commit bb977d1

Please sign in to comment.