summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relay.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r--usr.sbin/relayd/relay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 8c02fbfd568..9f1d52764dc 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.100 2008/08/08 20:34:30 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.101 2008/08/08 22:49:33 reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -1003,6 +1003,11 @@ relay_expand_http(struct ctl_relay_event *cre, char *val, char *buf, size_t len)
"$SERVER_PORT", ibuf) != 0)
return (NULL);
}
+ if (strstr(val, "$SERVER_NAME") != NULL) {
+ if (expand_string(buf, len,
+ "$SERVER_NAME", RELAYD_SERVERNAME) != 0)
+ return (NULL);
+ }
}
if (strstr(val, "$TIMEOUT") != NULL) {
snprintf(ibuf, sizeof(ibuf), "%lu", rlay->rl_conf.timeout.tv_sec);