The FIB and FIB6 configurations are filled field by field, which
leaves any field added to struct rte_fib_conf or struct rte_fib6_conf
uninitialized. Zero-initialize them.

Signed-off-by: Maxime Leroy <[email protected]>
---
 app/graph/l3fwd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/graph/l3fwd.c b/app/graph/l3fwd.c
index fe25e43da8..f077cfea7b 100644
--- a/app/graph/l3fwd.c
+++ b/app/graph/l3fwd.c
@@ -24,7 +24,7 @@
 static int
 setup_fib(int socket)
 {
-       struct rte_fib_conf conf;
+       struct rte_fib_conf conf = { 0 };
 
 #define FIB_MAX_ROUTES (UINT16_MAX)
 #define FIB_NUM_TBL8   (UINT16_MAX / 2)
@@ -41,7 +41,7 @@ setup_fib(int socket)
 static int
 setup_fib6(int socket)
 {
-       struct rte_fib6_conf conf;
+       struct rte_fib6_conf conf = { 0 };
 
 #define FIB6_MAX_ROUTES (UINT16_MAX)
 #define FIB6_NUM_TBL8   (UINT16_MAX / 2)
-- 
2.43.0

Reply via email to