X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_subnet.c;h=78e7eebce3eb655257b1fe7cda3d51c060298c81;hb=01dc7836703ba3aa113f3d0102f13ba73319e50b;hp=53afb8a4f20e61f2e7e787d103a25183952d63e3;hpb=1c475ecb575367a6b3f9328b0f643ad636155341;p=tinc diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index 53afb8a4..78e7eebc 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -23,9 +23,8 @@ #include "conf.h" #include "connection.h" +#include "crypto.h" #include "logger.h" -#include "net.h" -#include "netutl.h" #include "node.h" #include "protocol.h" #include "subnet.h" @@ -39,7 +38,7 @@ bool send_add_subnet(connection_t *c, const subnet_t *subnet) { return false; } - return send_request(c, "%d %x %s %s", ADD_SUBNET, rand(), subnet->owner->name, netstr); + return send_request(c, "%d %x %s %s", ADD_SUBNET, prng(UINT32_MAX), subnet->owner->name, netstr); } bool add_subnet_h(connection_t *c, const char *request) { @@ -155,7 +154,7 @@ bool send_del_subnet(connection_t *c, const subnet_t *s) { return false; } - return send_request(c, "%d %x %s %s", DEL_SUBNET, rand(), s->owner->name, netstr); + return send_request(c, "%d %x %s %s", DEL_SUBNET, prng(UINT32_MAX), s->owner->name, netstr); } bool del_subnet_h(connection_t *c, const char *request) {