diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-12-08 17:15:02 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-12-08 17:15:02 +0000 |
commit | f51951ec722b28e877b2e19822def8c8680161bb (patch) | |
tree | 86efc1d2e3460958ef9738e2d3165733d2e5c055 /usr.sbin | |
parent | 67f014d739e406309e7192d88049bf4590b0b84e (diff) |
make the generic handler for TCP-based protocols the default (allows
to use "protocol foo" without defining a type).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/parse.y | 5 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.conf.5 | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index 1865e787e99..a52eae95e70 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.98 2007/12/08 17:07:08 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.99 2007/12/08 17:14:26 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -197,7 +197,8 @@ hostname : /* empty */ { } ; -proto_type : TCP { $$ = RELAY_PROTO_TCP; } +proto_type : /* empty */ { $$ = RELAY_PROTO_TCP; } + | TCP { $$ = RELAY_PROTO_TCP; } | STRING { if (strcmp("http", $1) == 0) { $$ = RELAY_PROTO_HTTP; diff --git a/usr.sbin/relayd/relayd.conf.5 b/usr.sbin/relayd/relayd.conf.5 index b68a36412da..631f586ad2c 100644 --- a/usr.sbin/relayd/relayd.conf.5 +++ b/usr.sbin/relayd/relayd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayd.conf.5,v 1.72 2007/12/08 17:07:09 reyk Exp $ +.\" $OpenBSD: relayd.conf.5,v 1.73 2007/12/08 17:14:26 reyk Exp $ .\" .\" Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> .\" Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -529,8 +529,12 @@ application layer protocols: .It Ic http protocol Handle the Hypertext Transfer Protocol (HTTP or "HTTPS" if encapsulated in a SSL tunnel). -.It Ic tcp protocol +.It Xo +.Op Ic tcp +.Ic protocol +.Xc Generic handler for TCP-based protocols. +This is the default. .El .Pp .Xr relayd 8 @@ -969,7 +973,7 @@ option will allow a SSH session without delays between keystrokes or displayed output on the terminal: .Bd -literal -offset indent -tcp protocol "myssh" { +protocol "myssh" { tcp { nodelay, socket buffer 65536 } } |