diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-04-29 23:43:04 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-04-29 23:43:04 +0200 |
commit | d5b8311d81719f90a8f8d7f0b85ad320b9d7a0cd (patch) | |
tree | 21f97e4d1a53d35ded02a35c6fd587265ddff897 /include/internal/bitops.h | |
parent | 096567100178c1f2d49b0d3e7764e665d547c3fa (diff) |
conntrack: fix new ATTR_GRP_[ORIG|REPL]_ADDR_[SRC|DST]
The previous patch was incomplete. This fixes several issues with
it like the IPV4 and IPV6 address are mutually exclusive, thus,
the getter operation works. No sane way to support the setter
operation correctly, thus, it's been documented that it has no
effect.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/internal/bitops.h')
-rw-r--r-- | include/internal/bitops.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/internal/bitops.h b/include/internal/bitops.h index 0c1fde8..7ae566b 100644 --- a/include/internal/bitops.h +++ b/include/internal/bitops.h @@ -60,4 +60,17 @@ test_bitmask_u32(const uint32_t *buf1, const uint32_t *buf2, int len) return 1; } +static inline int +test_bitmask_u32_or(const uint32_t *buf1, const uint32_t *buf2, int len) +{ + int i; + + for (i=0; i<len; i++) { + if (buf1[i] & buf2[i]) { + return 1; + } + } + return 0; +} + #endif |