diff options
author | glebius <glebius@FreeBSD.org> | 2011-11-23 18:38:08 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2011-11-23 18:38:08 +0000 |
commit | 8df3e0017db9cfdab020b4e9618296c19980f6be (patch) | |
tree | c957ccdd35f5a219daeb4602f07851c3c0f1db1b /sbin | |
parent | d213dca17e7d1aaff815178dbdbc90e9ef95f20a (diff) | |
download | FreeBSD-src-8df3e0017db9cfdab020b4e9618296c19980f6be.zip FreeBSD-src-8df3e0017db9cfdab020b4e9618296c19980f6be.tar.gz |
Fix parsing of redirect_addr argument.
PR: kern/162739
MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/nat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index c95a625..6bec36c 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); |