mirror_frr/zebra
Donald Sharp d651649ed5 zebra: Fix zebra_rnh_register crash
Zebra is crashing inside of zserv_rnh_register when it attempts to
lookup a vrf that was just deleted:

Imagine this series of events:

Pre (A): ifdown -a -X eth0
(A) zebra notification from kernel that vrf is goneroo
(B) zebra notifies all daemons
(C) bgpd is churning because we have been removing interfaces and we
have an new path and it hasn't handled the vrf goneroo event yet from
zebra so it sends to zebra a new rnh with an old vrf_id.
(D) zebra attempts to lookup the zvrf and crashes because of pointer
dereference.

zebra handles all callbacks in one function. Convert that function to
check to see if we have a valid zvrf. If so make the callback

Ticket: CM-10482
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2016-04-20 16:17:14 -04:00
..
.gitignore [administrivia] Update gitignore files 2008-08-22 20:02:08 +01:00
client_main.c lib, vtysh: Return actual problem further up 2016-04-06 20:07:27 -04:00
connected.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
connected.h Zebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK 2015-11-16 12:48:07 -08:00
debug.c Zebra: Cleanup RIB debugs 2015-11-20 08:48:32 -08:00
debug.h Zebra: Cleanup RIB debugs 2015-11-20 08:48:32 -08:00
GNOME-PRODUCT-ZEBRA-MIB Initial revision 2002-12-13 20:15:29 +00:00
GNOME-SMI Initial revision 2002-12-13 20:15:29 +00:00
if_ioctl_solaris.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
if_ioctl.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
if_netlink.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
if_null.c lib, zebra: Rework zebra_ns to be a bit more modular 2016-04-14 20:56:57 -04:00
if_proc.c zebra: zebra-warnings.patch 2015-05-19 18:04:26 -07:00
if_sysctl.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
interface.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
interface.h lib, zebra: Rearrange vrf_delete_update 2016-04-14 20:56:12 -04:00
ioctl_null.c testzebra: pragma weak: detect systems with weak alias and provide alternative 2013-01-11 21:50:06 +01:00
ioctl_solaris.c Fixed ioctl_solaris.c:if_get_mtu() for IPv6'less operation 2007-08-21 16:12:40 +00:00
ioctl.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
ioctl.h [zebra/solaris] Interface state fixups for Solaris. 2006-01-25 04:31:40 +00:00
ipforward_aix.c Initial revision 2002-12-13 20:15:29 +00:00
ipforward_ews.c Initial revision 2002-12-13 20:15:29 +00:00
ipforward_proc.c zebra: fix warnings in forward proc 2011-12-07 01:24:09 +04:00
ipforward_solaris.c 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
ipforward_sysctl.c 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
ipforward.h 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
irdp_interface.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
irdp_main.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
irdp_packet.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
irdp.h zebra: deal with irdp compile warnings 2009-12-10 14:22:44 +03:00
kernel_netlink.c Initial revision 2002-12-13 20:15:29 +00:00
kernel_null.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
kernel_socket.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
kernel_socket.h [lib] mes_lookup string lookup table argument should be marked const 2008-08-22 19:52:58 +01:00
main.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
Makefile.am zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
misc_null.c zebra: zebra-warnings.patch 2015-05-19 18:04:26 -07:00
mtu_kvm.c 2004-05-09 Paul Jakma <paul@dishone.st> 2004-05-09 11:00:23 +00:00
redistribute_null.c zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
redistribute.c zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
redistribute.h zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
rib.h zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
router-id.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
router-id.h zebra: maintain the router-id per VRF 2015-10-30 00:19:15 -07:00
rt_ioctl.c zebra, bgp: Remove some missed values 2015-12-09 04:26:02 -08:00
rt_netlink.c quagga: Check for existence of IFLA_INFO_SLAVE_KIND 2016-04-15 15:07:59 -04:00
rt_netlink.h lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
rt_socket.c ZEBRA: Remove NEXTHOP_TYPE_XXX_IFNAME 2015-12-04 10:44:37 -08:00
rt.h Zebra: Implement route replace for IPv6 2015-11-19 12:22:55 -08:00
rtadv_null.c lib, zebra: Rework zebra_ns to be a bit more modular 2016-04-14 20:56:57 -04:00
rtadv.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
rtadv.h Zebra: Restrict IPv6 RA to valid interfaces 2016-03-22 16:52:35 +00:00
rtread_getmsg.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
rtread_netlink.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
rtread_proc.c Multi-Instance OSPF Summary 2015-05-19 18:03:42 -07:00
rtread_sysctl.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
test_main.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
testrib.conf zebra: Add an example config file for testzebra 2009-08-28 14:51:37 +01:00
zebra_fpm_netlink.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_fpm_private.h zebra: add module to communicate routes to FPM 2012-11-30 21:41:17 +01:00
zebra_fpm.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_fpm.h zebra: add module to communicate routes to FPM 2012-11-30 21:41:17 +01:00
zebra_ns.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_ns.h lib, zebra: Rework zebra_ns to be a bit more modular 2016-04-14 20:56:57 -04:00
zebra_ptm_null.c Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm_redistribute.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
zebra_ptm_redistribute.h Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm.c zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
zebra_ptm.h zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
zebra_rib.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_rnh_null.c Zebra: Fix static NHT to work properly in a VRF 2016-02-26 19:13:34 +00:00
zebra_rnh.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_rnh.h Zebra: Fix static NHT to work properly in a VRF 2016-02-26 19:51:34 +00:00
zebra_routemap.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
zebra_routemap.h Create override for quagga reinstall of originated routes 2015-08-26 05:21:40 -07:00
zebra_snmp.c zebra: Refactor struct zebra_t 2016-04-14 20:56:45 -04:00
zebra_vrf.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_vrf.h zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_vty.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra.conf.sample Initial revision 2002-12-13 20:15:29 +00:00
zserv_null.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zserv.c zebra: Fix zebra_rnh_register crash 2016-04-20 16:17:14 -04:00
zserv.h zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00