]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: MASQUERADE: fix --to-ports parser
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 20 May 2010 14:00:48 +0000 (16:00 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 20 May 2010 14:00:48 +0000 (16:00 +0200)
commit7278461dfad72e2008585dd0bac0e889e5bba99e
treefeb3d32598f9940b9417c0e6c49963231f98adc2
parent30290aea009cf3fd76f27336fb4370be3467c4da
extensions: MASQUERADE: fix --to-ports parser

Rewrite port range validator to use xtables_strtoui() and
xtables_param_act().  Original check failed to recognize
such port range errors as "1a-2" and "1-2a".
Also, original parser erroneously denied using port 0,
which is now allowed.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
extensions/libipt_MASQUERADE.c