]> git.meshlink.io Git - meshlink/blobdiff - src/net_packet.c
Improve support for submeshes.
[meshlink] / src / net_packet.c
index 7db041b9be15210e5d4566bdf487707510a3b3e9..857f00fac867452be47c1a5b63e652945333ae49 100644 (file)
 
 #include "system.h"
 
-#ifdef HAVE_ZLIB
-#include <zlib.h>
-#endif
-
 #include "conf.h"
 #include "connection.h"
 #include "crypto.h"
@@ -387,9 +383,9 @@ bool send_sptps_data(void *handle, uint8_t type, const void *data, size_t len) {
                   to ensure we get to learn the reflexive UDP address. */
                if(!to->status.validkey) {
                        to->incompression = mesh->self->incompression;
-                       return send_request(mesh, to->nexthop->connection, "%d %s %s %s -1 -1 -1 %d", ANS_KEY, mesh->self->name, to->name, buf, to->incompression);
+                       return send_request(mesh, to->nexthop->connection, NULL, "%d %s %s %s -1 -1 -1 %d", ANS_KEY, mesh->self->name, to->name, buf, to->incompression);
                } else {
-                       return send_request(mesh, to->nexthop->connection, "%d %s %s %d %s", REQ_KEY, mesh->self->name, to->name, REQ_SPTPS, buf);
+                       return send_request(mesh, to->nexthop->connection, NULL, "%d %s %s %d %s", REQ_KEY, mesh->self->name, to->name, REQ_SPTPS, buf);
                }
        }
 
@@ -555,7 +551,7 @@ void handle_incoming_vpn_data(event_loop_t *loop, void *data, int flags) {
        listen_socket_t *ls = data;
        vpn_packet_t pkt;
        char *hostname;
-       sockaddr_t from;
+       sockaddr_t from = {0};
        socklen_t fromlen = sizeof(from);
        node_t *n;
        int len;