* [NET_SCHED]: act_ipt: fix regression in ipt action
@ 2007-01-31 23:21 Patrick McHardy
2007-02-01 12:46 ` jamal
2007-02-02 8:43 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Patrick McHardy @ 2007-01-31 23:21 UTC (permalink / raw)
To: David S. Miller; +Cc: jamal, Kernel Netdev Mailing List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1764 bytes --]
[NET_SCHED]: act_ipt: fix regression in ipt action
The x_tables patch broke target module autoloading in the ipt action
by replacing the ipt_find_target call (which does autoloading) by
xt_find_target (which doesn't do autoloading). Additionally xt_find_target
may return ERR_PTR values in case of an error, which are not handled.
Use xt_request_find_target, which does both autoloading and ERR_PTR
handling properly. Also don't forget to drop the target module reference
again when xt_check_target fails.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 0252c2a43dd6b2d14d5c1d95db235d11064f6a0f
tree 441706f4506870381bef87ff46dfe8177749975c
parent 5263bf65d6342e12ab716db8e529501670979321
author Patrick McHardy <kaber@trash.net> Thu, 01 Feb 2007 00:13:51 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 01 Feb 2007 00:13:51 +0100
net/sched/act_ipt.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index a960806..01e6913 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -55,7 +55,8 @@ static int ipt_init_target(struct ipt_en
struct ipt_target *target;
int ret = 0;
- target = xt_find_target(AF_INET, t->u.user.name, t->u.user.revision);
+ target = xt_request_find_target(AF_INET, t->u.user.name,
+ t->u.user.revision);
if (!target)
return -ENOENT;
@@ -63,9 +64,10 @@ static int ipt_init_target(struct ipt_en
ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t),
table, hook, 0, 0);
- if (ret)
+ if (ret) {
+ module_put(t->u.kernel.target->me);
return ret;
-
+ }
if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(table, NULL,
t->u.kernel.target, t->data,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [NET_SCHED]: act_ipt: fix regression in ipt action
2007-01-31 23:21 [NET_SCHED]: act_ipt: fix regression in ipt action Patrick McHardy
@ 2007-02-01 12:46 ` jamal
2007-02-02 8:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: jamal @ 2007-02-01 12:46 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, Kernel Netdev Mailing List
On Thu, 2007-01-02 at 00:21 +0100, Patrick McHardy wrote:
> plain text document attachment (x)
> [NET_SCHED]: act_ipt: fix regression in ipt action
>
Looks fine to me - Thanks Patrick.
cheers,
jamal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [NET_SCHED]: act_ipt: fix regression in ipt action
2007-01-31 23:21 [NET_SCHED]: act_ipt: fix regression in ipt action Patrick McHardy
2007-02-01 12:46 ` jamal
@ 2007-02-02 8:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2007-02-02 8:43 UTC (permalink / raw)
To: kaber; +Cc: hadi, netdev
Applied, thanks Patrick.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-02 8:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 23:21 [NET_SCHED]: act_ipt: fix regression in ipt action Patrick McHardy
2007-02-01 12:46 ` jamal
2007-02-02 8:43 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.