summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/parse.y
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2009-08-05 13:46:14 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2009-08-05 13:46:14 +0000
commit9cf9d3f9417b9bc23172dde9843df37ab87d07d5 (patch)
tree9eb54071ed19d16954c5972b3988a7ad8e635c6e /usr.sbin/relayd/parse.y
parent584ad849718300e719b0c35389723c9c65349846 (diff)
prevent configuration of relays listening to a single addr:port tuple twice
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r--usr.sbin/relayd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index e3b521f94a4..42b737372c8 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.135 2009/08/05 13:37:06 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.136 2009/08/05 13:46:13 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -2390,7 +2390,8 @@ relay_inherit(struct relay *ra, struct relay *rb)
goto err;
}
- if (relay_findbyname(conf, rb->rl_conf.name) != NULL) {
+ if (relay_findbyname(conf, rb->rl_conf.name) != NULL ||
+ relay_findbyaddr(conf, &rb->rl_conf) != NULL) {
yyerror("relay %s defined twice", rb->rl_conf.name);
goto err;
}