Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0400c4f authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by David S. Miller
Browse files

[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: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbd36ea4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -154,11 +154,14 @@ extern void nfattr_parse(struct nfattr *tb[], int maxattr,

#define nfattr_bad_size(tb, max, cta_min)				\
({	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]){	\
 			__res = 1;					\
 			break;						\
 		}							\
 	}								\
 	__res;								\
})