[PATCH] fib: fix adding a default route
    Vladimir Medvedkin 
    vladimir.medvedkin at intel.com
       
    Mon Jul  3 17:43:35 CEST 2023
    
    
  
Fixed an issue that occurs when
adding a default route as the first route.
Bugzilla ID: 1160
Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")
Cc: stable at dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
v2:
 - remove unnecessary parenthesis
---
 lib/fib/dir24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index a8ba4f64ca..3efdcb533c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -390,7 +390,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);
-- 
2.25.1
    
    
More information about the stable
mailing list