diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-05-14 17:24:46 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-09-28 12:40:59 -0400 |
| commit | 2b5ecd4ca6b5fb63cd3e2b82c647350a5259a42a (patch) | |
| tree | a57ed2d6b748c4abb08d96af51afc8a18df94124 | |
| parent | cd53e3a6e6fd4dd9319fad0222b97fc564e9cb4c (diff) | |
zebra: fix route validity check with NHG ID
Fix check in zread where we determine validity of a route
based on reading in nexthops/checking ID is present.
We had a bad conditional that was determining a route
is bad if its not NHG ID based.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| -rw-r--r-- | zebra/zapi_msg.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 91c04893df..4191e1ca39 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1902,13 +1902,13 @@ static void zread_route_add(ZAPI_HANDLER_ARGS) re->nhe_id = api.nhgid; if (!re->nhe_id - || !zapi_read_nexthops(client, &api.prefix, api.nexthops, api.flags, - api.message, api.nexthop_num, - api.backup_nexthop_num, &ng, NULL) - || !zapi_read_nexthops(client, &api.prefix, api.backup_nexthops, - api.flags, api.message, - api.backup_nexthop_num, - api.backup_nexthop_num, NULL, &bnhg)) { + && (!zapi_read_nexthops(client, &api.prefix, api.nexthops, + api.flags, api.message, api.nexthop_num, + api.backup_nexthop_num, &ng, NULL) + || !zapi_read_nexthops(client, &api.prefix, api.backup_nexthops, + api.flags, api.message, + api.backup_nexthop_num, + api.backup_nexthop_num, NULL, &bnhg))) { XFREE(MTYPE_RE, re); return; } |
