From ade3e97a4eb6b460ce24369a6855236c86538ff7 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Sat, 12 Apr 2014 21:00:13 +0200 Subject: [PATCH] Revert "Leave 14 bytes for legacy MTU probing" This reverts commit 28f92f84d5adb5b0b07abab7cb72c4eceb0ca1ec. --- src/libmeshlink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libmeshlink.c b/src/libmeshlink.c index 67d945e0..00eaa09c 100644 --- a/src/libmeshlink.c +++ b/src/libmeshlink.c @@ -565,7 +565,7 @@ bool tinc_send_packet(node_t *receiver, const char* buf, unsigned int len) { vpn_packet_t packet; tincpackethdr* hdr = malloc(sizeof(tincpackethdr)); - if (14 + sizeof(hdr) + len > MAXSIZE) { + if (sizeof(hdr) + len > MAXSIZE) { //log something return false; @@ -577,9 +577,8 @@ bool tinc_send_packet(node_t *receiver, const char* buf, unsigned int len) { packet.priority = 0; packet.len = sizeof(tincpackethdr) + len; - memset(packet.data,1,14); - memcpy(packet.data+14,hdr,32); - memcpy(packet.data+32+14,buf,len); + memcpy(packet.data,hdr,32); + memcpy(packet.data+32,buf,len); myself->in_packets++; myself->in_bytes += packet.len; -- 2.39.5