aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2011-11-23 18:38:08 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2011-11-23 18:38:08 +0000
commit8d913bf8e8c483e4cbe97d7dd329f3e1b06dcded (patch)
treec957ccdd35f5a219daeb4602f07851c3c0f1db1b /sbin/ipfw
parentf1e7af36c0bfebfaaaf4e330f7441c148a7d71b7 (diff)
downloadsrc-8d913bf8e8c483e4cbe97d7dd329f3e1b06dcded.tar.gz
src-8d913bf8e8c483e4cbe97d7dd329f3e1b06dcded.zip
Fix parsing of redirect_addr argument.
PR: kern/162739 MFC after: 3 days
Notes
Notes: svn path=/head/; revision=227901
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c
index c95a625d5e9b..6bec36c27396 100644
--- a/sbin/ipfw/nat.c
+++ b/sbin/ipfw/nat.c
@@ -345,11 +345,12 @@ setup_redir_addr(char *buf, int *ac, char ***av)
space = sizeof(struct cfg_redir);
/* Extract local address. */
- if ((sep = strtok(**av, ",")) != NULL) {
+ if (strchr(**av, ',') != NULL) {
struct cfg_spool *spool;
/* Setup LSNAT server pool. */
r->laddr.s_addr = INADDR_NONE;
+ sep = strtok(**av, ",");
while (sep != NULL) {
spool = (struct cfg_spool *)buf;
space += sizeof(struct cfg_spool);