diff options
author | Mark Stapp <mjs@voltanet.io> | 2019-12-12 15:53:55 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2019-12-12 18:55:51 +0100 |
commit | 1f6a5aca264d5cc78aa4fd16bbad31d91a80f01a (patch) | |
tree | 8210b722844de3c3929f536c73c9465d03eda1bd | |
parent | zebra: accept async notification for un-install (diff) | |
download | frr-1f6a5aca264d5cc78aa4fd16bbad31d91a80f01a.tar.xz frr-1f6a5aca264d5cc78aa4fd16bbad31d91a80f01a.zip |
zebra: handle route notification with no nexthops
Handle the special case where a route update contains
no installed nexthops - that means the route is not
installed.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
-rw-r--r-- | zebra/zebra_rib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index fb5dadd2d..f375036db 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1369,6 +1369,14 @@ static bool rib_update_re_from_ctx(struct route_entry *re, ctx_nexthop = dplane_ctx_get_ng(ctx)->nexthop; + /* Nothing installed - we can skip some of the checking/comparison + * of nexthops. + */ + if (ctx_nexthop == NULL) { + changed_p = true; + goto no_nexthops; + } + /* Get the first `installed` one to check against. * If the dataplane doesn't set these to be what was actually installed, * it will just be whatever was in re->nhe->nhg? @@ -1431,6 +1439,8 @@ static bool rib_update_re_from_ctx(struct route_entry *re, goto done; } +no_nexthops: + /* FIB nexthop set differs from the RIB set: * create a fib-specific nexthop-group */ |