From 548b0411aa1e98dfdec7a1d074a8cbf14c964646 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 28 Nov 2011 08:14:59 +0000 Subject: [PATCH] MFhead r227901: Fix parsing of redirect_addr argument. PR: kern/162739 Approved by: re (kib) git-svn-id: svn://svn.freebsd.org/base/releng/9.0@228052 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/ipfw/nat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index c95a625d..6bec36c2 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); -- 2.45.0