summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorCedric Berger <cedric@cvs.openbsd.org>2003-07-10 05:25:28 +0000
committerCedric Berger <cedric@cvs.openbsd.org>2003-07-10 05:25:28 +0000
commited1c4da0591d1b70052ea9147e5c6a24821fe65c (patch)
tree6c33a98a097e1ffc3377890a60517eaf883303cd /sbin
parentda1c1478579a8b8e9ff70fb1a3710c42ef39e65a (diff)
Fix merging of host lists.
ok dhartmei@ henning@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y11
1 files changed, 4 insertions, 7 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 8600be752ed..4d4a4fc7918 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.397 2003/07/04 11:05:44 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.398 2003/07/10 05:25:27 cedric Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1742,13 +1742,12 @@ ipspec : ANY { $$ = NULL; }
host_list : xhost { $$ = $1; }
| host_list comma xhost {
- /* $3 may be a list, so use its tail pointer */
if ($3 == NULL)
$$ = $1;
else if ($1 == NULL)
$$ = $3;
else {
- $1->tail->next = $3->tail;
+ $1->tail->next = $3;
$1->tail = $3->tail;
$$ = $1;
}
@@ -2397,8 +2396,7 @@ redirspec : host { $$ = $1; }
redir_host_list : host { $$ = $1; }
| redir_host_list comma host {
- /* $3 may be a list, so use its tail pointer */
- $1->tail->next = $3->tail;
+ $1->tail->next = $3;
$1->tail = $3->tail;
$$ = $1;
}
@@ -2869,8 +2867,7 @@ route_host_list : route_host { $$ = $1; }
"same address family");
YYERROR;
}
- /* $3 may be a list, so use its tail pointer */
- $1->tail->next = $3->tail;
+ $1->tail->next = $3;
$1->tail = $3->tail;
$$ = $1;
}