summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2011-04-12 12:43:14 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2011-04-12 12:43:14 +0000
commitc04d6354110ba72dedd3f76871761e16b9f9fff2 (patch)
tree75f392b2f042bf3d57c53015cdc5caafb73c2b4c /usr.sbin
parent7e34b8858905860813099bc43242445b9f7b9254 (diff)
Splicing is currently only supported for TCP relays, not for HTTP or
others (HTTP will need a more complicated splicing mechanism to switch between headers and bodies in userland and kernel). Add the "no splice" flag for non-TCP relays by default to indicate it in the debug and status output.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/relayd/parse.y9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 3c79f2a4ff7..0c8ae637fb8 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.151 2011/04/12 12:37:22 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.152 2011/04/12 12:43:13 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -798,6 +798,13 @@ proto : relay_proto PROTO STRING {
p->type = $1;
p->cache = RELAY_CACHESIZE;
p->tcpflags = TCPFLAG_DEFAULT;
+ if (p->type != RELAY_PROTO_TCP) {
+ /*
+ * Splicing is currently only supported
+ * for plain TCP relays.
+ */
+ p->tcpflags |= TCPFLAG_NSPLICE;
+ }
p->sslflags = SSLFLAG_DEFAULT;
p->tcpbacklog = RELAY_BACKLOG;
(void)strlcpy(p->sslciphers, SSLCIPHERS_DEFAULT,