From 21cf6b211badb0a4a2de8995e562f815255c2ab7 Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Sun, 8 Oct 2017 17:56:23 +0200 Subject: [PATCH] rfapi: avoid calling NULL() function. Keep the execution flow, bug log errors. Signed-off-by: Vincent Jardin --- bgpd/rfapi/rfapi_import.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index d963a759ac..083a549307 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -3861,6 +3861,20 @@ void rfapiBgpInfoFilteredImportVPN( VNC_ITRCCK; } +static void rfapiBgpInfoFilteredImportBadSafi( + struct rfapi_import_table *import_table, int action, struct peer *peer, + void *rfd, /* set for looped back routes */ + struct prefix *p, + struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */ + afi_t afi, struct prefix_rd *prd, + struct attr *attr, /* part of bgp_info */ + u_char type, /* part of bgp_info */ + u_char sub_type, /* part of bgp_info */ + uint32_t *label) /* part of bgp_info */ +{ + vnc_zlog_debug_verbose("%s: Error, bad safi", __func__); +} + static rfapi_bi_filtered_import_f * rfapiBgpInfoFilteredImportFunction(safi_t safi) { @@ -3874,7 +3888,7 @@ rfapiBgpInfoFilteredImportFunction(safi_t safi) default: /* not expected */ zlog_err("%s: bad safi %d", __func__, safi); - return NULL; + return rfapiBgpInfoFilteredImportBadSafi; } } -- 2.39.5