From fa745181dcc595660cc9c4eac17df2fb5be1259c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 Aug 2021 17:27:59 +0200 Subject: [PATCH] platform/netlink: drop unused NLA_NUL_STRING type Kernel implemente NLA_NUL_STRING type, but we don't implement exactly the same type checks. Drop NLA_NUL_STRING and use a plain NLA_STRING instead. --- src/libnm-platform/nm-linux-platform.c | 2 +- src/libnm-platform/nm-netlink.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index d27e457814..3d57b7ff3f 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -2305,7 +2305,7 @@ _wireguard_get_device_cb(struct nl_msg *msg, void *arg) { static const struct nla_policy policy[] = { [WGDEVICE_A_IFINDEX] = {.type = NLA_U32}, - [WGDEVICE_A_IFNAME] = {.type = NLA_NUL_STRING, .maxlen = IFNAMSIZ}, + [WGDEVICE_A_IFNAME] = {.type = NLA_STRING, .maxlen = IFNAMSIZ}, [WGDEVICE_A_PRIVATE_KEY] = {}, [WGDEVICE_A_PUBLIC_KEY] = {}, [WGDEVICE_A_FLAGS] = {.type = NLA_U32}, diff --git a/src/libnm-platform/nm-netlink.h b/src/libnm-platform/nm-netlink.h index a3644d49bd..3946286716 100644 --- a/src/libnm-platform/nm-netlink.h +++ b/src/libnm-platform/nm-netlink.h @@ -36,7 +36,6 @@ enum { NLA_STRING, /* NUL terminated character string */ NLA_FLAG, /* Flag */ NLA_NESTED, /* Nested attributes */ - NLA_NUL_STRING, __NLA_TYPE_MAX, };