summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2015-07-15 17:14:50 +0000
committerjsing <jsing@openbsd.org>2015-07-15 17:14:50 +0000
commit3c95d8d8e383e7905314e162c81d8e92c8c3ac57 (patch)
tree64ee2519ff8d73762f5609d21c310d79d57ec5fe
parentFix possible 32 byte buffer overrun, found by coverity, CID 78869 (diff)
downloadwireguard-openbsd-3c95d8d8e383e7905314e162c81d8e92c8c3ac57.tar.xz
wireguard-openbsd-3c95d8d8e383e7905314e162c81d8e92c8c3ac57.zip
Unbreak configurations that have a non-TLS listen statement followed by a
TLS listen statement. A bug was introduced in r1.68 of parse.y, which results in flags being directly copied from the parent, meaning that the TLS flag for the second server gets lost. ok reyk@
-rw-r--r--usr.sbin/httpd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index 1ba5cf33cb1..0353d7703a2 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.68 2015/06/23 15:23:14 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.69 2015/07/15 17:14:50 jsing Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -408,7 +408,8 @@ serveroptsl : LISTEN ON STRING opttls port {
if (alias != NULL) {
/* IP-based; use name match flags from parent */
- alias->flags = srv->srv_conf.flags;
+ alias->flags &= ~SRVFLAG_SERVER_MATCH;
+ alias->flags |= srv->srv_conf.flags & SRVFLAG_SERVER_MATCH;
TAILQ_INSERT_TAIL(&srv->srv_hosts,
alias, entry);
}