From 6ae27a4be5a25c6ff3593ad970137defdd7ee7b3 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Sun, 23 Jan 2022 16:10:55 +0300 Subject: [PATCH] ospfd: fix crash on "ospf send-extra-data zebra" `ospf->new_table` is NULL if the OSPF instance has no routes. Signed-off-by: Igor Ryzhov --- ospfd/ospf_vty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 3d0804b018..9940ce1c69 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -2223,6 +2223,9 @@ static void ospf_table_reinstall_routes(struct ospf *ospf, { struct route_node *rn; + if (!rt) + return; + for (rn = route_top(rt); rn; rn = route_next(rn)) { struct ospf_route *or;