netlink: set maximum size of WGDEVICE_A_IFNAME

This commit is contained in:
Yu Watanabe
2019-01-14 04:43:33 +09:00
parent 227bcd91b4
commit 33c2ea8019

View File

@@ -732,7 +732,7 @@ static const NLTypeSystem genl_wireguard_peer_type_system = {
static const NLType genl_wireguard_set_device_types[] = {
[WGDEVICE_A_IFINDEX] = { .type = NETLINK_TYPE_U32 },
[WGDEVICE_A_IFNAME] = { .type = NETLINK_TYPE_STRING },
[WGDEVICE_A_IFNAME] = { .type = NETLINK_TYPE_STRING, .size = IFNAMSIZ-1 },
[WGDEVICE_A_FLAGS] = { .type = NETLINK_TYPE_U32 },
[WGDEVICE_A_PRIVATE_KEY] = { .size = WG_KEY_LEN },
[WGDEVICE_A_LISTEN_PORT] = { .type = NETLINK_TYPE_U16 },