summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_addrtype.c
Commit message (Collapse)AuthorAgeFilesLines
* extensions: include strings.h for the definition of ffs()Maciej Żenczykowski2020-04-281-0/+1
| | | | | | | | | | | | | | | | | | This resolves clang compiler warnings: extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:89:32: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] printf(" --ulog-nlgroup %d", ffs(loginfo->nl_group)); ^ extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:105:9: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ffs(loginfo->nl_group)); ^ extensions/libext_srcs/gen/gensrcs/external/iptables/extensions/libxt_addrtype.c:263:14: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int first = ffs(val); ^ Test: builds with less warnings Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extensions: libxt_addrtype: Add translation to nftPhil Sutter2017-03-081-0/+69
| | | | | | | | | | | | | | | | | | | Translate addrtype match into fib expression: $ iptables-translate -A INPUT -m addrtype --src-type LOCAL nft add rule ip filter INPUT fib saddr type local counter $ iptables-translate -A INPUT -m addrtype --dst-type LOCAL nft add rule ip filter INPUT fib daddr type local counter $ iptables-translate -A INPUT -m addrtype ! --dst-type ANYCAST,LOCAL nft add rule ip filter INPUT fib daddr type != { local, anycast } counter $ iptables-translate -A INPUT -m addrtype --limit-iface-in --dst-type ANYCAST,LOCAL nft add rule ip filter INPUT fib daddr . iif type { local, anycast } counter Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extensions: add copyright statementsPatrick McHardy2013-05-291-0/+2
| | | | | | Add copyright statements to all extensions authored by myself. Signed-off-by: Patrick McHardy <kaber@trash.net>
* extensions: libxt_addrtype: fix type in help messagePablo Neira Ayuso2012-09-081-1/+1
| | | | | | | | --limit-iface-out Match only on the packet's incoming device Note that it says "incoming" when it should say "outcoming" Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* libxt_addrtype: add support for revision 1Jan Engelhardt2011-08-281-32/+24
| | | | | | | | Rev 1 was added to the kernel in commit v2.6.39-rc1~468^2~10^2~1 but there was no corresponding iptables patch so far. Cc: Florian Westphal <fw@strlen.de> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* libxt_addrtype: rename from libipt_addrtypeJan Engelhardt2011-08-281-0/+308
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>