summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/parse.y
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-03-03 16:47:29 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-03-03 16:47:29 +0000
commitfce6a2c3e8ebe02ea2e73fe41f4e968a946a28d9 (patch)
treef48723dc137cfbc8fccebc010e3c8e20ded25f83 /usr.sbin/relayd/parse.y
parent56df9ec0151b584c011b50ec07a21f9c28512858 (diff)
Inherit global table options.
From Armin Wolfermann ok pyr@ deraadt@
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r--usr.sbin/relayd/parse.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 80144c6c51d..4f759278e20 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.109 2008/02/27 15:36:42 mpf Exp $ */
+/* $OpenBSD: parse.y,v 1.110 2008/03/03 16:47:28 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -2052,6 +2052,12 @@ table_inherit(struct table *tb)
}
tb->conf.flags |= dsttb->conf.flags;
+ /* Inherit global table options */
+ bcopy(&dsttb->conf.timeout, &tb->conf.timeout, sizeof(struct timeval));
+ tb->conf.skip_cnt = dsttb->conf.skip_cnt;
+ strlcpy(tb->conf.demote_group, dsttb->conf.demote_group,
+ sizeof(tb->conf.demote_group));
+
/* Copy the associated hosts */
bzero(&tb->hosts, sizeof(tb->hosts));
TAILQ_FOREACH(dsth, &dsttb->hosts, entry) {