* [PATCH] From fryasu: Trim kernel struct to allow deletion for TEE targets
@ 2014-11-09 14:15 Loganaden Velvindron
2014-11-10 17:17 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Loganaden Velvindron @ 2014-11-09 14:15 UTC (permalink / raw)
To: netfilter-devel
Correct trimming of userspacesize to fix deletions.
Signed-off-by: Loganaden Velvindron <logan@elandsys.com>
---
bz: 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.
I tested on the latest iptables from master and the issue is stil present.
The diff fixes the issue, feedback welcomed.
extensions/libxt_TEE.c | 4 ++--
1 file 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,
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] From fryasu: Trim kernel struct to allow deletion for TEE targets
2014-11-09 14:15 [PATCH] From fryasu: Trim kernel struct to allow deletion for TEE targets Loganaden Velvindron
@ 2014-11-10 17:17 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-10 17:17 UTC (permalink / raw)
To: Loganaden Velvindron; +Cc: netfilter-devel
On Sun, Nov 09, 2014 at 06:15:05AM -0800, Loganaden Velvindron wrote:
> Correct trimming of userspacesize to fix deletions.
Applied, thanks Loganaden.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-10 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09 14:15 [PATCH] From fryasu: Trim kernel struct to allow deletion for TEE targets Loganaden Velvindron
2014-11-10 17:17 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).