From 84cc12071c403a529f82e05efab3631c9b014140 Mon Sep 17 00:00:00 2001 From: "G. Paul Ziemba" Date: Sat, 14 Apr 2018 15:34:21 -0700 Subject: bgp/rfapi: fix rfapiNhlAddNodeRoutes SA issue Signed-off-by: G. Paul Ziemba --- bgpd/rfapi/rfapi_import.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'bgpd/rfapi/rfapi_import.c') diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index d5208f696..392c87867 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -1543,10 +1543,15 @@ static int rfapiNhlAddNodeRoutes( int count = 0; int is_l2 = (rn->p.family == AF_ETHERNET); - if (rfapiRibFTDFilterRecentPrefix( - (struct rfapi_descriptor *)(rfd_rib_node->table->info), rn, - pfx_target_original)) { - return 0; + if (rfd_rib_node && rfd_rib_node->table && rfd_rib_node->table->info) { + struct rfapi_descriptor *rfd; + + rfd = (struct rfapi_descriptor *)(rfd_rib_node->table->info); + + if (rfapiRibFTDFilterRecentPrefix( + rfd, rn, pfx_target_original)) + + return 0; } seen_nexthops = -- cgit v1.2.3