* Fix for u32 match, problems when parsing arguments
@ 2004-09-02 12:28 Piotr Gasidło
2004-09-02 20:55 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Piotr Gasidło @ 2004-09-02 12:28 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1.1: Type: text/plain, Size: 429 bytes --]
Hello,
I've found bug in u32 iptables helper library.
# iptables -A FORWARD -m u32 --u32 "0&0xffffffff=0"
iptables v1.2.11: u32: at char 2 error reading number
Attached patch, fixes problem.
--
Piotr 'QuakeR' Gasidło, BOFH @ pandora.barbara.eu.org
############## sending lusers to /dev/null since 1998
##### Waiting for tomorrow, for a little ray of light
### Waiting for tomorrow just to see your smile again
[-- Attachment #1.2: libipt_u32_fix.diff --]
[-- Type: text/plain, Size: 432 bytes --]
diff -uNr iptables.orig/extensions/libipt_u32.c iptables/extensions/libipt_u32.c
--- iptables.orig/extensions/libipt_u32.c Thu Sep 2 14:13:50 2004
+++ iptables/extensions/libipt_u32.c Thu Sep 2 13:20:23 2004
@@ -85,7 +85,7 @@
char *end;
errno = 0;
- number = strtol(*s, &end, 0);
+ number = strtoul(*s, &end, 0);
if (end == *s)
exit_error(PARAMETER_PROBLEM,
"u32: at char %d expected number", pos);
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix for u32 match, problems when parsing arguments
2004-09-02 12:28 Fix for u32 match, problems when parsing arguments Piotr Gasidło
@ 2004-09-02 20:55 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2004-09-02 20:55 UTC (permalink / raw)
To: Piotr Gasid³o; +Cc: netfilter-devel
Piotr Gasid³o wrote:
>Hello,
>
>I've found bug in u32 iptables helper library.
>
># iptables -A FORWARD -m u32 --u32 "0&0xffffffff=0"
>iptables v1.2.11: u32: at char 2 error reading number
>
>
>Attached patch, fixes problem.
>
>
Applied, thanks.
Regards
Patrick
>
>
>------------------------------------------------------------------------
>
>diff -uNr iptables.orig/extensions/libipt_u32.c iptables/extensions/libipt_u32.c
>--- iptables.orig/extensions/libipt_u32.c Thu Sep 2 14:13:50 2004
>+++ iptables/extensions/libipt_u32.c Thu Sep 2 13:20:23 2004
>@@ -85,7 +85,7 @@
> char *end;
> errno = 0;
>
>- number = strtol(*s, &end, 0);
>+ number = strtoul(*s, &end, 0);
> if (end == *s)
> exit_error(PARAMETER_PROBLEM,
> "u32: at char %d expected number", pos);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-02 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02 12:28 Fix for u32 match, problems when parsing arguments Piotr Gasidło
2004-09-02 20:55 ` Patrick McHardy
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.