Skip to content

Commit

Permalink
fib: fix adding default route
Browse files Browse the repository at this point in the history
[ upstream commit 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc ]

Fixed an issue that occurs when
adding a default route as the first route.

Bugzilla ID: 1160
Fixes: 7dc7868 ("fib: add DIR24-8 dataplane algorithm")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
  • Loading branch information
vmedvedk authored and kevintraynor committed Jul 12, 2023
1 parent ac5250b commit 5634ca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fib/dir24_8.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
(uint32_t)(1ULL << (32 - tmp_depth));
} else {
redge = ip + (uint32_t)(1ULL << (32 - depth));
if (ledge == redge)
if (ledge == redge && ledge != 0)
break;
ret = install_to_fib(dp, ledge, redge,
next_hop);
Expand Down

0 comments on commit 5634ca2

Please sign in to comment.