diff options
author | 2015-12-24 13:58:30 +0000 | |
---|---|---|
committer | 2015-12-24 13:58:30 +0000 | |
commit | 6965b31bc1a3b668192b7b8defae65f0ec3c9711 (patch) | |
tree | 374b23825441eb625ec6c199c78d082d4d0247bd | |
parent | tweak auto-allocation description, with and ok jmc@ (diff) | |
download | wireguard-openbsd-6965b31bc1a3b668192b7b8defae65f0ec3c9711.tar.xz wireguard-openbsd-6965b31bc1a3b668192b7b8defae65f0ec3c9711.zip |
revert check_tcp rev 1.41 by yasuoka@
This part was not meant to be commited, only the bits in check_icmp.c
and relayd.h are ok.
ok yasuoka@
-rw-r--r-- | usr.sbin/relayd/check_tcp.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/usr.sbin/relayd/check_tcp.c b/usr.sbin/relayd/check_tcp.c index b1cde96535c..0b19d47e6f2 100644 --- a/usr.sbin/relayd/check_tcp.c +++ b/usr.sbin/relayd/check_tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_tcp.c,v 1.48 2015/11/28 09:52:07 reyk Exp $ */ +/* $OpenBSD: check_tcp.c,v 1.49 2015/12/24 13:58:30 benno Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -41,7 +41,6 @@ void tcp_close(struct ctl_tcp_event *, int); void tcp_send_req(int, short, void *); void tcp_read_buf(int, short, void *); -int check_http_resphead(struct ctl_tcp_event *); int check_http_code(struct ctl_tcp_event *); int check_http_digest(struct ctl_tcp_event *); int check_send_expect(struct ctl_tcp_event *); @@ -159,7 +158,7 @@ tcp_host_up(struct ctl_tcp_event *cte) hce_notify_done(cte->host, HCE_TCP_CONNECT_OK); return; case CHECK_HTTP_CODE: - cte->validate_read = check_http_resphead; + cte->validate_read = NULL; cte->validate_close = check_http_code; break; case CHECK_HTTP_DIGEST: @@ -301,24 +300,6 @@ check_send_expect(struct ctl_tcp_event *cte) } int -check_http_resphead(struct ctl_tcp_event *cte) -{ - int i, siz; - - /* checks whether the buffer contains the response header */ - siz = ibuf_size(cte->buf); - for (i = 0; i <= siz - 4; i++) { - if (cte->buf->buf[i] == '\r' && - cte->buf->buf[i + 1] == '\n' && - cte->buf->buf[i + 2] == '\r' && - cte->buf->buf[i + 3] == '\n') - return (0); - } - - return (1); -} - -int check_http_code(struct ctl_tcp_event *cte) { char *head; |