iptables: fix the dead loop when meeting unknown options
PATCH 1/1 iptables: fix the dead loop when meeting unknown options
Signed-off-by Changli Gao <[email protected]>
--- xshared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xshared.c +1 -1
@@ -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)
Quoted 9 lines · Changli Gao
Signed-off-by Changli Gao <[email protected]>---
xshared.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)xshared.c +0
-0
xshared.c static bool should_load_proto(struct iptables_command_state *cs) · line 96
Quoted 6 lines
xshared.c +1
-1@@ -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
Quoted 12 lines · Jan Engelhardt
Quoted 10 lines · Changli Gao
Signed-off-by Changli Gao <[email protected]>---
xshared.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)xshared.c +0
-0@@ -92,7 +92,7 @@ static bool should_load_proto(struct iptables_command_state *cs) if (find_proto(cs->protocol, XTF_DONT_LOAD,
Quoted 9 lines
xshared.c static bool should_load_proto(struct iptables_command_state *cs) · line 96
Quoted 5 lines
xshared.c +1
-1cs->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. :)
Signature · 6 lines
Regards, Changli Gao([email protected]) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html