Commit fe3b30dd authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

netlink: remove NLA_NESTED_COMPAT

This isn't used anywhere, so we might as well get rid of it.
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1042caa7
...@@ -172,7 +172,6 @@ enum { ...@@ -172,7 +172,6 @@ enum {
NLA_FLAG, NLA_FLAG,
NLA_MSECS, NLA_MSECS,
NLA_NESTED, NLA_NESTED,
NLA_NESTED_COMPAT,
NLA_NUL_STRING, NLA_NUL_STRING,
NLA_BINARY, NLA_BINARY,
NLA_S8, NLA_S8,
...@@ -203,7 +202,6 @@ enum { ...@@ -203,7 +202,6 @@ enum {
* NLA_BINARY Maximum length of attribute payload * NLA_BINARY Maximum length of attribute payload
* NLA_NESTED Don't use `len' field -- length verification is * NLA_NESTED Don't use `len' field -- length verification is
* done by checking len of nested header (or empty) * done by checking len of nested header (or empty)
* NLA_NESTED_COMPAT Minimum length of structure payload
* NLA_U8, NLA_U16, * NLA_U8, NLA_U16,
* NLA_U32, NLA_U64, * NLA_U32, NLA_U64,
* NLA_S8, NLA_S16, * NLA_S8, NLA_S16,
......
...@@ -140,17 +140,6 @@ static int validate_nla(const struct nlattr *nla, int maxtype, ...@@ -140,17 +140,6 @@ static int validate_nla(const struct nlattr *nla, int maxtype,
return -ERANGE; return -ERANGE;
break; break;
case NLA_NESTED_COMPAT:
if (attrlen < pt->len)
return -ERANGE;
if (attrlen < NLA_ALIGN(pt->len))
break;
if (attrlen < NLA_ALIGN(pt->len) + NLA_HDRLEN)
return -ERANGE;
nla = nla_data(nla) + NLA_ALIGN(pt->len);
if (attrlen < NLA_ALIGN(pt->len) + NLA_HDRLEN + nla_len(nla))
return -ERANGE;
break;
case NLA_NESTED: case NLA_NESTED:
/* a nested attributes is allowed to be empty; if its not, /* a nested attributes is allowed to be empty; if its not,
* it must have a size of at least NLA_HDRLEN. * it must have a size of at least NLA_HDRLEN.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment