summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_TEE.c
Commit message (Collapse)AuthorAgeFilesLines
* src: introduce struct xt_xlate_{mt,tg}_paramsPablo Neira Ayuso2016-07-251-9/+8
| | | | | | | | This structure is an extensible containers of parameters, so we don't need to propagate interface updates in every extension file in case we need to add new parameters in the future. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* iptables: extensions: libxt_TEE: Add translation to nftRoberto García2016-03-281-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add translation for TEE target to nft. However, there is a problem with the output when using ip6tables-translate. I couldn't find a fix for that. Examples: $ iptables-translate -t mangle -A PREROUTING \ -j TEE --gateway 192.168.0.2 --oif eth0 nft add rule ip mangle PREROUTING counter dup to 192.168.0.2 device eth0 $ iptables-translate -t mangle -A PREROUTING \ -j TEE --gateway 192.168.0.2 nft add rule ip mangle PREROUTING counter dup to 192.168.0.2 $ ip6tables-translate -t mangle -A PREROUTING \ -j TEE --gateway ab12:00a1:1112:acba:: nft add rule ip6 mangle PREROUTING counter dup to ab12:a1:1112:acba:: $ ip6tables-translate -t mangle -A PREROUTING \ -j TEE --gateway ab12:00a1:1112:acba:: --oif eth0 nft add rule ip6 mangle PREROUTING counter dup to ab12:a1:1112:acba:: device eth0 Signed-off-by: Roberto García <rodanber@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extensions: libxt_TEE: Trim kernel struct to allow deletionLoganaden Velvindron2014-11-091-2/+2
| | | | | | | | | | | | | | | Correct trimming of userspacesize to fix deletions. Fixes: Bugzilla #884. The rule having TEE target with '--oif' option cannot be deleted by iptables command. $ iptables -I INPUT -i foo -j TEE --gateway x.x.x.x --oif bar $ iptables -D INPUT -i foo -j TEE --gateway x.x.x.x --oif bar iptables: No chain/target/match by that name. Signed-off-by: Loganaden Velvindron <logan@elandsys.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extensions: use multi-target registrationJan Engelhardt2011-07-221-28/+28
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* libxtables: do not overlay addr and mask parts, and cleanupJan Engelhardt2011-05-091-1/+1
| | | | | | | | | XTTYPE_HOSTMASK will require that what has now become haddr, hmask/hlen are not overlays of another. Thus relax the structure and always set all members of the {haddr, hmask, hlen} triplet now for all types that touch any of the members. Add some more comments and clean out ONEHOST.
* libxt_TEE: use guided option parserJan Engelhardt2011-04-141-89/+14
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* iptables: do not print trailing whitespacesJan Engelhardt2011-01-311-10/+10
| | | | | | | | | | | | | | | | | Due to the use of printf("foobar "), iptables emits spaces at the end-of-line, which looks odd to some users because it causes the terminal to wrap even if there is seemingly nothing to print. It may also have other points of annoyance, such as mailers interpreting a trailing space as an indicator that the paragraph continues when format=flowed is also on. And git highlights trailing spaces in red, so let's avoid :) Preexisting inconsistencies in outputting spaces in the right spot are also addressed right away. References: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=429579 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: fix static linkingJan Engelhardt2010-08-031-1/+1
| | | | | | | | | | | | | | | | Gabor Z. Papp noted this link-time error when configuring with --enable-static: extensions/libext4.a(initext4.o): In function "init_extensions": extensions/initext4.c:144: undefined reference to "libxt_IDLETIMER_init" extensions/initext4.c:145: undefined reference to "libxt_TEE_init" Indeed, since the two modules did not use our special macro "_init" (which expands to libxt_foo_init), initext4.c could not find them by that name. Correct this. References: http://marc.info/?l=netfilter&m=128085480927924&w=2 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* Revert "Revert "Merge branch 'iptables-next'""Patrick McHardy2010-05-211-0/+202
| | | | | | This reverts commit 110c1e4502e21ea38e0980e6f8af857d24330099. Revert the revert to restore the TEE target.
* Revert "Merge branch 'iptables-next'"Patrick McHardy2010-05-211-202/+0
| | | | | | | This reverts commit 65414babaebcd403e9bf2c27d9d74adb369bf3aa, reversing changes made to 7278461dfad72e2008585dd0bac0e889e5bba99e. Forgot to commit the version increase.
* extensions: add support for xt_TEEJan Engelhardt2010-04-191-0/+202
xt_TEE is firstly included in Linux 2.6.35. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>