summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbatmancn <batmanustc@gmail.com>2020-11-30 20:04:44 +0800
committermergify-bot <noreply@mergify.io>2021-08-03 20:51:29 +0000
commitb0717215c9311e95b88e28f68a96f7b24f875a2d (patch)
tree1d6e36a207f7fc82ccdba58bd8fab3452fa583fa
parent3190cc20eb58f0dd95cd71e03bc90109810101af (diff)
zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE
There exists some rare situations where fpm will attempt to send a route update with no valid nexthops. In that case an assert would be hit. This is not good for trying to keep your routing daemons up and running when we can safely just recover the situation. Fixes #7588 Signed-off-by: batmancn <batmanustc@gmail.com> <fixed commit message, and used zlog_err> Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 5306e6cf00c58a4c4558609d623ecbbd79faabf1)
-rw-r--r--zebra/zebra_fpm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 07a8288605..855e19dc45 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1002,7 +1002,6 @@ static int zfpm_build_route_updates(void)
data_len = zfpm_encode_route(dest, re, (char *)data,
buf_end - data, &msg_type);
- assert(data_len);
if (data_len) {
hdr->msg_type = msg_type;
msg_len = fpm_data_len_to_msg_len(data_len);
@@ -1013,6 +1012,9 @@ static int zfpm_build_route_updates(void)
zfpm_g->stats.route_adds++;
else
zfpm_g->stats.route_dels++;
+ } else {
+ zlog_err("%s: Encoding Prefix: %pRN No valid nexthops",
+ __func__, dest->rnode);
}
}