diff options
author | 2011-04-12 12:43:13 +0000 | |
---|---|---|
committer | 2011-04-12 12:43:13 +0000 | |
commit | 8ed1afddf2f9614d6acc092a6ce836482594ad81 (patch) | |
tree | 18ce95c019f731d927cf96a7c2306703b3b02c81 | |
parent | update flags and printing of flags in debug mode, handle splicing flag. (diff) | |
download | wireguard-openbsd-8ed1afddf2f9614d6acc092a6ce836482594ad81.tar.xz wireguard-openbsd-8ed1afddf2f9614d6acc092a6ce836482594ad81.zip |
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.
-rw-r--r-- | usr.sbin/relayd/parse.y | 9 |
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, |