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.
This commit is contained in:
Thomas Haller 2021-08-10 17:27:59 +02:00
parent f7635c9ffe
commit fa745181dc
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 1 additions and 2 deletions

View file

@ -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},

View file

@ -36,7 +36,6 @@ enum {
NLA_STRING, /* NUL terminated character string */
NLA_FLAG, /* Flag */
NLA_NESTED, /* Nested attributes */
NLA_NUL_STRING,
__NLA_TYPE_MAX,
};