1
0
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:
Pouria Mousavizadeh Tehrani
2026-04-21 15:47:00 +03:30
parent 07a3501e6c
commit d95a73b4c7
+1 -1
View File
@@ -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;