]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_nexthop.c
bgpd: Fix crash when using v4 route w/ v6 nexthop
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Oct 2018 15:27:30 +0000 (11:27 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Oct 2018 15:27:30 +0000 (11:27 -0400)
commit7f040da1a18981277a1db29764a3dc6f0e7d2f10
tree72244bcfefbcbab0c33ac650ff24ef807ac67a5f
parentd725199ad91716d54360d2e628383a2615cd5165
bgpd: Fix crash when using v4 route w/ v6 nexthop

Recent changes to the nht code in bgp caused us to actually
keep a true count of v6 nexthop paths when using v4 over v6.
This change introduced a race condition on shutdown on who
got to the bnc cache first( the v4 table or not ).  Effectively
we were allowing the continued existence of the path->nexthop
pointing to the freed bnc.  This was especially true when
we had route leaking.   So when we free the bnc make sure
we clean up the path->nexthop variables pointing at it too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_nexthop.c
bgpd/bgp_nht.c
bgpd/bgp_nht.h