summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2011-06-22 08:20:01 +0000
committerglebius <glebius@FreeBSD.org>2011-06-22 08:20:01 +0000
commit5b5e9b6b99db5e50dca23adaf0b6f25a80936e79 (patch)
tree96ef02e4ec9999ce00ad717077e07290f4fd51c5 /sbin/ipfw
parent927e352870db8c56ad0e654fa446f77f2930e20f (diff)
downloadFreeBSD-src-5b5e9b6b99db5e50dca23adaf0b6f25a80936e79.zip
FreeBSD-src-5b5e9b6b99db5e50dca23adaf0b6f25a80936e79.tar.gz
One more braino from me.
Pointy hat to: glebius Submitted by: Alexander V. Chernikov <melifaro ipfw.ru>
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/nat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c
index ecb5d8a..efadeba 100644
--- a/sbin/ipfw/nat.c
+++ b/sbin/ipfw/nat.c
@@ -785,8 +785,9 @@ ipfw_config_nat(int ac, char **av)
len += estimate_redir_port(&ac1, &av1);
av1 += 2; ac1 -= 2;
/* Skip optional remoteIP/port */
- if (ac1 != 0 && isdigit(**av1))
+ if (ac1 != 0 && isdigit(**av1)) {
av1++; ac1--;
+ }
break;
case TOK_REDIR_PROTO:
if (ac1 < 2)
@@ -795,10 +796,12 @@ ipfw_config_nat(int ac, char **av)
len += sizeof(struct cfg_redir);
av1 += 2; ac1 -= 2;
/* Skip optional remoteIP/port */
- if (ac1 != 0 && isdigit(**av1))
+ if (ac1 != 0 && isdigit(**av1)) {
av1++; ac1--;
- if (ac1 != 0 && isdigit(**av1))
+ }
+ if (ac1 != 0 && isdigit(**av1)) {
av1++; ac1--;
+ }
break;
default:
errx(EX_DATAERR, "unrecognised option ``%s''", av1[-1]);
OpenPOWER on IntegriCloud