All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iptables: fix the dead loop when meeting unknown options
@ 2011-03-14  6:23 Changli Gao
  2011-04-14  7:20 ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Changli Gao @ 2011-03-14  6:23 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Jan Engelhardt, netfilter-devel, Changli Gao

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 xshared.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xshared.c b/xshared.c
index 404a9f5..87402b4 100644
--- a/xshared.c
+++ b/xshared.c
@@ -92,7 +92,7 @@ static bool should_load_proto(struct iptables_command_state *cs)
 	if (find_proto(cs->protocol, XTF_DONT_LOAD,
 	    cs->options & OPT_NUMERIC, NULL) == NULL)
 		return true;
-	return cs->proto_used;
+	return !cs->proto_used;
 }
 
 struct xtables_match *load_proto(struct iptables_command_state *cs)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iptables: fix the dead loop when meeting unknown options
  2011-03-14  6:23 [PATCH] iptables: fix the dead loop when meeting unknown options Changli Gao
@ 2011-04-14  7:20 ` Jan Engelhardt
  2011-04-14  7:30   ` Changli Gao
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2011-04-14  7:20 UTC (permalink / raw)
  To: Changli Gao; +Cc: Patrick McHardy, netfilter-devel

On Monday 2011-03-14 07:23, Changli Gao wrote:

>Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>---
> xshared.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>diff --git a/xshared.c b/xshared.c
>index 404a9f5..87402b4 100644
>--- a/xshared.c
>+++ b/xshared.c
>@@ -92,7 +92,7 @@ static bool should_load_proto(struct iptables_command_state *cs)
> 	if (find_proto(cs->protocol, XTF_DONT_LOAD,
> 	    cs->options & OPT_NUMERIC, NULL) == NULL)
> 		return true;
>-	return cs->proto_used;
>+	return !cs->proto_used;
> }

Could you, for completeness, give the command that causes the infinite 
loop?

thanks,
Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iptables: fix the dead loop when meeting unknown options
  2011-04-14  7:20 ` Jan Engelhardt
@ 2011-04-14  7:30   ` Changli Gao
  0 siblings, 0 replies; 3+ messages in thread
From: Changli Gao @ 2011-04-14  7:30 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Patrick McHardy, netfilter-devel

On Thu, Apr 14, 2011 at 3:20 PM, Jan Engelhardt <jengelh@medozas.de> wrote:
> On Monday 2011-03-14 07:23, Changli Gao wrote:
>
>>Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>>---
>> xshared.c |    2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>diff --git a/xshared.c b/xshared.c
>>index 404a9f5..87402b4 100644
>>--- a/xshared.c
>>+++ b/xshared.c
>>@@ -92,7 +92,7 @@ static bool should_load_proto(struct iptables_command_state *cs)
>>       if (find_proto(cs->protocol, XTF_DONT_LOAD,
>>           cs->options & OPT_NUMERIC, NULL) == NULL)
>>               return true;
>>-      return cs->proto_used;
>>+      return !cs->proto_used;
>> }
>
> Could you, for completeness, give the command that causes the infinite
> loop?
>

I can't remember it clearly. At that time, I was testing connlimit.
Maybe a spell mistake in the option list for connlimit. You can refer
to the comment above the code, and the code isn't consistent with the
comment. This bug maybe just a typo by you. :)

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-14  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14  6:23 [PATCH] iptables: fix the dead loop when meeting unknown options Changli Gao
2011-04-14  7:20 ` Jan Engelhardt
2011-04-14  7:30   ` Changli Gao

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.