summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-01-15 07:21:22 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-01-25 20:14:38 -0500
commit5ea8213f147d34584b1e8ef492d3712014f3a572 (patch)
treedeb3f69e3c69480c0e8a191344df79511bc260ad /zebra/rt_socket.c
parente677d1094573649dcea181dad91bf0d0fb40726a (diff)
zebra: Fix use before initialized
When we discover that a command given to the route add/delete function in rt_socket.c is bogus, print out a debug message but don't attempt to actually use a nexthop that we have not figured out yet as part of the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 9cc2efb3e9..f25259f300 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -92,10 +92,9 @@ static int kernel_rtm(int cmd, const struct prefix *p,
*/
if (cmd != RTM_ADD && cmd != RTM_DELETE) {
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: %s odd command %s for flags %d",
+ zlog_debug("%s: %s odd command %s",
__func__, prefix_buf,
- lookup_msg(rtm_type_str, cmd, NULL),
- nexthop->flags);
+ lookup_msg(rtm_type_str, cmd, NULL));
return 0;
}