linux-cp: fix route prefix construction

Prevent comparison ops for uninitialized IPv6 prefix bytes.

Type: fix

Change-Id: I440fea7f0725769406ad348eb3402a98c593dc3c
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
This commit is contained in:
Alexander Skorichenko
2023-12-26 16:27:10 +01:00
committed by Matthew Smith
parent 2c9b128e1b
commit afefe22e5d
+1 -1
View File
@@ -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: