[PATCH] netlink: add minlen validation for the new signed types

Subsystems: library code, the rest

STALE5087d

2 messages, 2 authors, 2012-08-30 · open the first message on its own page

[PATCH] netlink: add minlen validation for the new signed types

From: Julian Anastasov <ja@ssi.bg>
Date: 2012-08-26 08:46:05

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
 lib/nlattr.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/nlattr.c b/lib/nlattr.c
index 4226dfe..18eca78 100644
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -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,
-- 
1.7.3.4

Re: [PATCH] netlink: add minlen validation for the new signed types

From: David Miller <davem@davemloft.net>
Date: 2012-08-30 17:12:14

From: Julian Anastasov <ja@ssi.bg>
Date: Sun, 26 Aug 2012 11:47:57 +0300
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Applied to net-next, thanks Julian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help