]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE
authorbatmancn <batmanustc@gmail.com>
Mon, 30 Nov 2020 12:04:44 +0000 (20:04 +0800)
committermergify-bot <noreply@mergify.io>
Mon, 9 Aug 2021 07:43:17 +0000 (07:43 +0000)
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)

zebra/zebra_fpm.c

index f84c8c1fcc364a20a52be0bfc48bd34c35123fc1..7b0611bf934a1d4d57bb7d08e6af37d474786bf3 100644 (file)
@@ -995,7 +995,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);
@@ -1006,6 +1005,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);
                        }
                }