Fix for u32 match, problems when parsing arguments
Patrick McHardy
kaber at trash.net
Thu Sep 2 22:55:27 CEST 2004
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);
>
>
More information about the netfilter-devel
mailing list