diff options
| author | Loganaden Velvindron <logan@elandsys.com> | 2014-11-09 06:15:05 -0800 |
|---|---|---|
| committer | Lorenzo Colitti <lorenzo@google.com> | 2015-03-19 13:44:53 +0900 |
| commit | 84e5e86b6dbfd4031b72d21ddca099dd4b3e7452 (patch) | |
| tree | 2024cf9810cf0f4da6a282ab86fce1f8ac00448b | |
| parent | e3928b77f18db0fdc615693017c6c15eb71bf4e0 (diff) | |
| download | android_external_iptables-84e5e86b6dbfd4031b72d21ddca099dd4b3e7452.tar.gz android_external_iptables-84e5e86b6dbfd4031b72d21ddca099dd4b3e7452.tar.bz2 android_external_iptables-84e5e86b6dbfd4031b72d21ddca099dd4b3e7452.zip | |
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.
[Cherry-pick of iptables df3741332d86629a8fdd267930e0a249803f6aa8]
Signed-off-by: Loganaden Velvindron <logan@elandsys.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Change-Id: Ieb43487811669d502074330a0cba7c8d4c9c7446
| -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 92c7601..66c060d 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, |
