]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_subnet.c
Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
[meshlink] / src / protocol_subnet.c
index 65ab6e13948cc922f3d8230da495d0f74741f5a0..6f9e626eb092191fc40b3b27dafce0493d8ffdf7 100644 (file)
@@ -45,7 +45,7 @@ bool add_subnet_h(connection_t *c, char *request) {
        char subnetstr[MAX_STRING_SIZE];
        char name[MAX_STRING_SIZE];
        node_t *owner;
-       subnet_t s = {0}, *new, *old;
+       subnet_t s = {NULL}, *new, *old;
 
        if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
                logger(LOG_ERR, "Got bad %s from %s (%s)", "ADD_SUBNET", c->name,
@@ -117,7 +117,7 @@ bool add_subnet_h(connection_t *c, char *request) {
        if(strictsubnets) {
                logger(LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s",
                                "ADD_SUBNET", c->name, c->hostname, subnetstr);
-               forward_request(c);
+               forward_request(c, request);
                return true;
        }
 
@@ -155,7 +155,7 @@ bool del_subnet_h(connection_t *c, char *request) {
        char subnetstr[MAX_STRING_SIZE];
        char name[MAX_STRING_SIZE];
        node_t *owner;
-       subnet_t s = {0}, *find;
+       subnet_t s = {NULL}, *find;
 
        if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
                logger(LOG_ERR, "Got bad %s from %s (%s)", "DEL_SUBNET", c->name,
@@ -209,7 +209,7 @@ bool del_subnet_h(connection_t *c, char *request) {
                ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for %s which does not appear in his subnet tree",
                                   "DEL_SUBNET", c->name, c->hostname, name);
                if(strictsubnets)
-                       forward_request(c);
+                       forward_request(c, request);
                return true;
        }