-/* $OpenBSD: relay.c,v 1.174 2014/07/13 00:32:08 benno Exp $ */
+/* $OpenBSD: relay.c,v 1.175 2014/07/14 00:11:12 bluhm Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
struct evbuffer *src = EVBUFFER_INPUT(bev);
getmonotime(&con->se_tv_last);
+ cre->timedout = 0;
if (!EVBUFFER_LENGTH(src))
return;
relay_close(con, "buffer event timeout");
break;
case 1:
+ cre->timedout = 1;
bufferevent_enable(bev, EV_READ);
break;
}
bufferevent_enable(bev, EV_READ);
break;
}
+ } else if (cre->dst->timedout) {
+ relay_close(con, "splice timeout");
+ return;
}
if (relay_spliceadjust(cre) == -1)
goto fail;
-/* $OpenBSD: relay_http.c,v 1.30 2014/07/13 15:39:01 reyk Exp $ */
+/* $OpenBSD: relay_http.c,v 1.31 2014/07/14 00:11:12 bluhm Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
struct kv *hdr = NULL;
getmonotime(&con->se_tv_last);
+ cre->timedout = 0;
size = EVBUFFER_LENGTH(src);
DPRINTF("%s: session %d: size %lu, to read %lld",
size_t size;
getmonotime(&con->se_tv_last);
+ cre->timedout = 0;
size = EVBUFFER_LENGTH(src);
DPRINTF("%s: session %d: size %lu, to read %lld", __func__,
size_t size;
getmonotime(&con->se_tv_last);
+ cre->timedout = 0;
size = EVBUFFER_LENGTH(src);
DPRINTF("%s: session %d: size %lu, to read %lld", __func__,
-/* $OpenBSD: relayd.h,v 1.188 2014/07/13 00:32:08 benno Exp $ */
+/* $OpenBSD: relayd.h,v 1.189 2014/07/14 00:11:12 bluhm Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
enum sslreneg_state sslreneg_state;
off_t splicelen;
- int line;
- size_t headerlen;
off_t toread;
+ size_t headerlen;
+ int line;
int done;
+ int timedout;
enum direction dir;
u_int8_t *buf;