|
@@ -1483,7 +1483,10 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
|
|
|
[IFLA_LINKINFO] = { .type = NLA_NESTED },
|
|
|
[IFLA_NET_NS_PID] = { .type = NLA_U32 },
|
|
|
[IFLA_NET_NS_FD] = { .type = NLA_U32 },
|
|
|
- [IFLA_IFALIAS] = { .type = NLA_STRING, .len = IFALIASZ-1 },
|
|
|
+ /* IFLA_IFALIAS is a string, but policy is set to NLA_BINARY to
|
|
|
+ * allow 0-length string (needed to remove an alias).
|
|
|
+ */
|
|
|
+ [IFLA_IFALIAS] = { .type = NLA_BINARY, .len = IFALIASZ - 1 },
|
|
|
[IFLA_VFINFO_LIST] = {. type = NLA_NESTED },
|
|
|
[IFLA_VF_PORTS] = { .type = NLA_NESTED },
|
|
|
[IFLA_PORT_SELF] = { .type = NLA_NESTED },
|