Fix parsing of redirect_addr argument.

PR:		kern/162739
MFC after:	3 days
This commit is contained in:
Gleb Smirnoff 2011-11-23 18:38:08 +00:00
parent f1e7af36c0
commit 8d913bf8e8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227901

View File

@ -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);