Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2011 18:38:09 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227901 - head/sbin/ipfw
Message-ID:  <201111231838.pANIc9vo058051@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Nov 23 18:38:08 2011
New Revision: 227901
URL: http://svn.freebsd.org/changeset/base/227901

Log:
  Fix parsing of redirect_addr argument.
  
  PR:		kern/162739
  MFC after:	3 days

Modified:
  head/sbin/ipfw/nat.c

Modified: head/sbin/ipfw/nat.c
==============================================================================
--- head/sbin/ipfw/nat.c	Wed Nov 23 18:15:49 2011	(r227900)
+++ head/sbin/ipfw/nat.c	Wed Nov 23 18:38:08 2011	(r227901)
@@ -345,11 +345,12 @@ setup_redir_addr(char *buf, int *ac, cha
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111231838.pANIc9vo058051>