提交 c0400c4f 编写于 作者: P Pablo Neira Ayuso 提交者: David S. Miller

[NETFILTER] nfnetlink: skip size check if size not specified (== 0)

Skip sizecheck if the size of the attribute wasn't specified, ie. zero.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NHarald Welte <laforge@netfilter.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dbd36ea4
...@@ -154,11 +154,14 @@ extern void nfattr_parse(struct nfattr *tb[], int maxattr, ...@@ -154,11 +154,14 @@ extern void nfattr_parse(struct nfattr *tb[], int maxattr,
#define nfattr_bad_size(tb, max, cta_min) \ #define nfattr_bad_size(tb, max, cta_min) \
({ int __i, __res = 0; \ ({ int __i, __res = 0; \
for (__i=0; __i<max; __i++) \ for (__i=0; __i<max; __i++) { \
if (!cta_min[__i]) \
continue; \
if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \ if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \
__res = 1; \ __res = 1; \
break; \ break; \
} \ } \
} \
__res; \ __res; \
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册