Revert "Try to read more than a single packet from the TUN device."

This reverts commit 019126abfd.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-04-06 09:08:44 +02:00
parent 7d07ccb1e4
commit bd9aaa1228
3 changed files with 2 additions and 31 deletions

View File

@@ -1204,7 +1204,7 @@ static int tun_mainloop(struct worker_st *ws, struct timespec *tnow)
int ret, l, e;
unsigned tls_retry;
l = read(ws->tun_fd, ws->buffer + 8, ws->buffer_size-8);
l = read(ws->tun_fd, ws->buffer + 8, ws->conn_mtu);
if (l < 0) {
e = errno;
@@ -1232,7 +1232,7 @@ static int tun_mainloop(struct worker_st *ws, struct timespec *tnow)
ws->buffer[7] = AC_PKT_DATA;
ret = dtls_send_data(ws->dtls_session, ws->buffer + 7, l, ws->conn_mtu+1);
ret = tls_send(ws->dtls_session, ws->buffer + 7, l + 1);
GNUTLS_FATAL_ERR(ret);
if (ret == GNUTLS_E_LARGE_PACKET) {