summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-02-20 00:18:19 +0000
committerhenning <henning@openbsd.org>2003-02-20 00:18:19 +0000
commitcb4c3aecc5e6de0622274654f6a1d2f47dda4e5b (patch)
tree5ff67b1287e6d96039f871dacb1b550b35059dc1
parenttypo (diff)
downloadwireguard-openbsd-cb4c3aecc5e6de0622274654f6a1d2f47dda4e5b.tar.xz
wireguard-openbsd-cb4c3aecc5e6de0622274654f6a1d2f47dda4e5b.zip
reject nonexistant interfaces in the dynaddr case, noticed during discussion
with jasondixon at myrealbox dot com ok dhartmei@
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 757e50c5c7e..e9deada2f83 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.325 2003/02/19 22:00:20 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.326 2003/02/20 00:18:19 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1588,6 +1588,10 @@ number : STRING {
;
address : '(' STRING ')' {
+ if (ifa_exists($2) == NULL) {
+ yyerror("interface %s does not exist", $2);
+ YYERROR;
+ }
$$ = calloc(1, sizeof(struct node_host));
if ($$ == NULL)
err(1, "address: calloc");