diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2013-04-08 15:51:25 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-04-29 14:08:44 -0400 |
commit | 43c56e595bb81319230affd545392536c933317e (patch) | |
tree | 61db0ec532d858885e812432b41e42188adb6738 /include | |
parent | 37fe0660981d7a1577409226f77554c2c5123e27 (diff) |
netfilter: ipset: Make possible to test elements marked with nomatch
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/ipset/ip_set.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index 7958e84a65af..970187187f5b 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
@@ -200,6 +200,14 @@ ip_set_eexist(int ret, u32 flags) | |||
200 | return ret == -IPSET_ERR_EXIST && (flags & IPSET_FLAG_EXIST); | 200 | return ret == -IPSET_ERR_EXIST && (flags & IPSET_FLAG_EXIST); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* Match elements marked with nomatch */ | ||
204 | static inline bool | ||
205 | ip_set_enomatch(int ret, u32 flags, enum ipset_adt adt) | ||
206 | { | ||
207 | return adt == IPSET_TEST && | ||
208 | ret == -ENOTEMPTY && ((flags >> 16) & IPSET_FLAG_NOMATCH); | ||
209 | } | ||
210 | |||
203 | /* Check the NLA_F_NET_BYTEORDER flag */ | 211 | /* Check the NLA_F_NET_BYTEORDER flag */ |
204 | static inline bool | 212 | static inline bool |
205 | ip_set_attr_netorder(struct nlattr *tb[], int type) | 213 | ip_set_attr_netorder(struct nlattr *tb[], int type) |