diff options
author | Alexander Skorichenko <askorichenko@netgate.com> | 2023-12-26 16:27:10 +0100 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2024-01-10 16:16:35 +0000 |
commit | afefe22e5d0ed0004d21b974d601c81f8a2b66b9 (patch) | |
tree | f23babe74ad78c6184fc8b9de3bd23ef44927575 | |
parent | 2c9b128e1b3732f9dd62699922480f9206a02b2d (diff) |
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>
-rw-r--r-- | src/plugins/linux-cp/lcp_router.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |