From: Kirill Isakov Date: Thu, 21 Apr 2022 08:11:16 +0000 (+0600) Subject: connection_t: remove unused compression_level field X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=391985158c16f4a3894a798f6788cfb23dfcfea9;p=tinc connection_t: remove unused compression_level field --- diff --git a/src/connection.h b/src/connection.h index 9ca1e8da..e39d74bb 100644 --- a/src/connection.h +++ b/src/connection.h @@ -60,7 +60,6 @@ typedef union connection_status_t { #include "edge.h" #include "net.h" #include "node.h" -#include "compression.h" #ifndef DISABLE_LEGACY typedef struct legacy_crypto_t { @@ -109,11 +108,7 @@ typedef struct connection_t { sptps_t sptps; int outmaclength; - - union { - compression_level_t outcompression; - debug_t log_level; // used for REQ_LOG - }; + debug_t log_level; /* used for REQ_LOG */ uint8_t *hischallenge; /* The challenge we sent to him */ uint8_t *mychallenge; /* The challenge we received */ diff --git a/src/net_setup.c b/src/net_setup.c index 79bed8c5..b0b87608 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1002,8 +1002,6 @@ static bool setup_myself(void) { myself->incompression = COMPRESS_NONE; } - myself->connection->outcompression = COMPRESS_NONE; - /* Done */ myself->nexthop = myself; diff --git a/src/net_socket.c b/src/net_socket.c index af1bec22..8783b01a 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -649,7 +649,6 @@ begin: c->status.connecting = true; c->name = xstrdup(outgoing->node->name); c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->last_ping_time = now.tv_sec; connection_add(c); @@ -758,7 +757,6 @@ void handle_new_meta_connection(void *data, int flags) { c = new_connection(); c->name = xstrdup(""); c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->address = sa; c->hostname = sockaddr2hostname(&sa); diff --git a/src/protocol_auth.c b/src/protocol_auth.c index d1eb6c2c..22254575 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -42,6 +42,7 @@ #include "utils.h" #include "xalloc.h" #include "random.h" +#include "compression.h" #include "ed25519/sha512.h" #include "keys.h" @@ -608,7 +609,7 @@ bool send_metakey(connection_t *c) { bool result = send_request(c, "%d %d %d %d %d %s", METAKEY, cipher_get_nid(&c->legacy->out.cipher), digest_get_nid(&c->legacy->out.digest), c->outmaclength, - c->outcompression, hexkey); + COMPRESS_NONE, hexkey); c->status.encryptout = true; return result;