From afefe22e5d0ed0004d21b974d601c81f8a2b66b9 Mon Sep 17 00:00:00 2001 From: Alexander Skorichenko Date: Tue, 26 Dec 2023 16:27:10 +0100 Subject: linux-cp: fix route prefix construction Prevent comparison ops for uninitialized IPv6 prefix bytes. Type: fix Change-Id: I440fea7f0725769406ad348eb3402a98c593dc3c Signed-off-by: Alexander Skorichenko --- src/plugins/linux-cp/lcp_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/linux-cp/lcp_router.c b/src/plugins/linux-cp/lcp_router.c index f53ec4fd8c6..0efd53e64ef 100644 --- a/src/plugins/linux-cp/lcp_router.c +++ b/src/plugins/linux-cp/lcp_router.c @@ -1007,6 +1007,7 @@ lcp_router_route_mk_prefix (struct rtnl_route *r, fib_prefix_t *p) ip46_address_t *paddr = &p->fp_addr; u32 entry; + ip46_address_reset (paddr); p->fp_proto = lcp_router_proto_k2f (nl_addr_get_family (addr)); switch (p->fp_proto) @@ -1018,7 +1019,6 @@ lcp_router_route_mk_prefix (struct rtnl_route *r, fib_prefix_t *p) p->fp_eos = MPLS_NON_EOS; return; case FIB_PROTOCOL_IP4: - ip46_address_reset (paddr); memcpy (&paddr->ip4, baddr, blen); break; case FIB_PROTOCOL_IP6: -- cgit 1.2.3-korg