mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 12:39:21 +00:00
lib: Fix possible usage of uninited data
assert when if_lookup_address is passed with
a family that is not AF_INET or AF_INET6 as
that we are dead in the water and this is a
dev escape
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 4d7aae38ab
)
This commit is contained in:
parent
fa2713e7b5
commit
cecb76bd3c
3
lib/if.c
3
lib/if.c
@ -490,7 +490,8 @@ struct connected *if_lookup_address(const void *matchaddr, int family,
|
|||||||
addr.family = AF_INET6;
|
addr.family = AF_INET6;
|
||||||
addr.u.prefix6 = *((struct in6_addr *)matchaddr);
|
addr.u.prefix6 = *((struct in6_addr *)matchaddr);
|
||||||
addr.prefixlen = IPV6_MAX_BITLEN;
|
addr.prefixlen = IPV6_MAX_BITLEN;
|
||||||
}
|
} else
|
||||||
|
assert(!"Attempted lookup of family not supported");
|
||||||
|
|
||||||
match = NULL;
|
match = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user