Fix for u32 match, problems when parsing arguments
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.
Signature · 4 lines
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
extensions/libipt_u32.c +1 -1
@@ -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);
Patrick McHardy
AppliedQuoted 11 lines · Piotr Gasid³o
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 numberAttached patch, fixes problem.
Applied, thanks.
Regards
Patrick
Quoted 18 lines
------------------------------------------------------------------------
diff -uNr
iptables.orig/extensions/libipt_u32.ciptables/extensions/libipt_u32.cextensions/libipt_u32.c +1
-1@@ -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);