mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
ifconfig: Fix segfault in geneve_status_nl
Initialize nla_geneve_link structure to zero to prevent
segfault when a TLV is not received by the netlink parser.
Reported by: Seth Hoffert <seth.hoffert@gmail.com>
Fixes: 688e289ee9 ("ifconfig: Add support for geneve (netlink)")
This commit is contained in:
@@ -286,7 +286,7 @@ geneve_status_nl(if_ctx *ctx)
|
||||
struct snl_writer nw;
|
||||
struct nlmsghdr *hdr;
|
||||
struct snl_errmsg_data errmsg;
|
||||
struct nla_geneve_link geneve_link;
|
||||
struct nla_geneve_link geneve_link = {0};
|
||||
char src[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN];
|
||||
struct sockaddr *lsa, *rsa;
|
||||
int mc;
|
||||
|
||||
Reference in New Issue
Block a user