]> git.meshlink.io Git - meshlink/commitdiff
put value in packet.len
authorSaverio Proto <zioproto@gmail.com>
Sat, 12 Apr 2014 16:33:32 +0000 (18:33 +0200)
committerSaverio Proto <zioproto@gmail.com>
Sat, 12 Apr 2014 16:33:32 +0000 (18:33 +0200)
src/libmeshlink.c

index e88b20c46d64dd2c8ea22826869617fbf96a45e4..00eaa09cd1e6cedd2e06326dbe712e8480ab4509 100644 (file)
@@ -575,6 +575,7 @@ bool tinc_send_packet(node_t *receiver, const char* buf, unsigned int len) {
        memcpy(hdr->source,myself->name,sizeof(hdr->source));
 
        packet.priority = 0;
+       packet.len = sizeof(tincpackethdr) + len;
 
        memcpy(packet.data,hdr,32);
        memcpy(packet.data+32,buf,len);