]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
netlink: set maximum size of WGDEVICE_A_IFNAME
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Jan 2019 19:43:33 +0000 (04:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Jan 2019 00:47:31 +0000 (09:47 +0900)
src/libsystemd/sd-netlink/netlink-types.c

index cd5cdcc6e55c58a9770f8af003a3ab260ed0d5d3..bb7e8c33bae3b9b979d09d9678167f284f078ec9 100644 (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 },