diff options
author | Loganaden Velvindron <logan@elandsys.com> | 2014-11-09 06:15:05 -0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-09 16:53:11 +0100 |
commit | df3741332d86629a8fdd267930e0a249803f6aa8 (patch) | |
tree | 659678f7ff16e5f33c5d5f856ea9e5de5bc36730 | |
parent | b92426faab5101bc250832fca85ee8fa3548572d (diff) |
extensions: libxt_TEE: Trim kernel struct to allow deletion
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>
-rw-r--r-- | extensions/libxt_TEE.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libxt_TEE.c b/extensions/libxt_TEE.c index 92c7601c..66c060d3 100644 --- a/extensions/libxt_TEE.c +++ b/extensions/libxt_TEE.c @@ -99,7 +99,7 @@ static struct xtables_target tee_tg_reg[] = { .revision = 1, .family = NFPROTO_IPV4, .size = XT_ALIGN(sizeof(struct xt_tee_tginfo)), - .userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)), + .userspacesize = offsetof(struct xt_tee_tginfo, priv), .help = tee_tg_help, .print = tee_tg_print, .save = tee_tg_save, @@ -112,7 +112,7 @@ static struct xtables_target tee_tg_reg[] = { .revision = 1, .family = NFPROTO_IPV6, .size = XT_ALIGN(sizeof(struct xt_tee_tginfo)), - .userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)), + .userspacesize = offsetof(struct xt_tee_tginfo, priv), .help = tee_tg_help, .print = tee_tg6_print, .save = tee_tg6_save, |