Reset tcplen after use.
[tinc] / src / meta.c
index 5735da7..e56c86f 100644 (file)
@@ -137,6 +137,7 @@ bool receive_meta(connection_t *c) {
                        if(c->tcplen) {
                                char *tcpbuffer = buffer_read(&c->inbuf, c->tcplen);
                                if(tcpbuffer) {
+                                       c->tcplen = 0;
                                        receive_tcppacket(c, tcpbuffer, c->tcplen);
                                        continue;
                                } else {