forked from Mirror/frr
fpm: guard against garbage in unused address bytes
Zero out the 12 unused bytes (for the IPv6 address) when reading in an
IPv4 address.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 95cf0b2279
)
This commit is contained in:
parent
495b2b0265
commit
8b89837c99
|
@ -111,6 +111,7 @@ static inline int fpm__nexthop__get(const Fpm__Nexthop *nh,
|
|||
|
||||
nexthop->vrf_id = VRF_DEFAULT;
|
||||
nexthop->type = NEXTHOP_TYPE_IPV4;
|
||||
memset(&nexthop->gate, 0, sizeof(nexthop->gate));
|
||||
nexthop->gate.ipv4 = ipv4;
|
||||
if (ifindex) {
|
||||
nexthop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
|
||||
|
|
Loading…
Reference in a new issue