summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/nat_cmd.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-02-10 17:26:14 +0000
committerbrian <brian@FreeBSD.org>2001-02-10 17:26:14 +0000
commit078570308c3e8c99cd0cef923b983e532fe2484b (patch)
treee2fdbbbdce238fd2e17dfce0e1b67e0ea55f6686 /usr.sbin/ppp/nat_cmd.c
parentd4e3ae3d2b0ba71baec8eaa715b2e04f155901bf (diff)
downloadFreeBSD-src-078570308c3e8c99cd0cef923b983e532fe2484b.zip
FreeBSD-src-078570308c3e8c99cd0cef923b983e532fe2484b.tar.gz
A better fix for the PacketAliasProxyRule() call.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Diffstat (limited to 'usr.sbin/ppp/nat_cmd.c')
-rw-r--r--usr.sbin/ppp/nat_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c
index 6b036d9..21c4ff1 100644
--- a/usr.sbin/ppp/nat_cmd.c
+++ b/usr.sbin/ppp/nat_cmd.c
@@ -304,15 +304,15 @@ nat_ProxyRule(struct cmdargs const *arg)
for (f = arg->argn, pos = 0; f < arg->argc; f++) {
len = strlen(arg->argv[f]);
- if (sizeof cmd - pos < len + (f ? 1 : 0))
+ if (sizeof cmd - pos < len + (len ? 1 : 0))
break;
- if (f)
+ if (len)
cmd[pos++] = ' ';
strcpy(cmd + pos, arg->argv[f]);
pos += len;
}
- return PacketAliasProxyRule(cmd + strspn(cmd, " \t"));
+ return PacketAliasProxyRule(cmd);
}
int
OpenPOWER on IntegriCloud