netlink: add minlen validation for the new signed types
authorJulian Anastasov <ja@ssi.bg>
Sat, 25 Aug 2012 22:47:57 +0000 (22:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2012 17:11:46 +0000 (13:11 -0400)
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/nlattr.c

index 4226dfeb51786f4e0a926499dca36f9b4f64d9d6..18eca7809b08894cd135519f8991e138bbc0fa2a 100644 (file)
@@ -22,6 +22,10 @@ static const u16 nla_attr_minlen[NLA_TYPE_MAX+1] = {
        [NLA_U64]       = sizeof(u64),
        [NLA_MSECS]     = sizeof(u64),
        [NLA_NESTED]    = NLA_HDRLEN,
+       [NLA_S8]        = sizeof(s8),
+       [NLA_S16]       = sizeof(s16),
+       [NLA_S32]       = sizeof(s32),
+       [NLA_S64]       = sizeof(s64),
 };
 
 static int validate_nla(const struct nlattr *nla, int maxtype,