X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=95bb7517521349751443f5bfebec5e15053bd085;hp=0d21be091bb6b2b0f45cc2ec1400b3060e87a305;hb=2116c6eb7d328c7aa3ce3da54f95367e5199d373;hpb=3fae14fae5a347823679ef694ab630b4991a201d diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 0d21be09..95bb7517 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -239,7 +239,7 @@ bool metakey_h(connection_t *c) { /* Check if the length of the meta key is all right */ - if(strlen(buffer) != len * 2) { + if(strlen(buffer) != (size_t)len * 2) { logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, c->hostname, "wrong keylength"); return false; } @@ -372,7 +372,7 @@ bool challenge_h(connection_t *c) { /* Check if the length of the challenge is all right */ - if(strlen(buffer) != len * 2) { + if(strlen(buffer) != (size_t)len * 2) { logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, c->hostname, "wrong challenge length"); return false; @@ -442,7 +442,7 @@ bool chal_reply_h(connection_t *c) { /* Check if the length of the hash is all right */ - if(strlen(hishash) != EVP_MD_size(c->outdigest) * 2) { + if(strlen(hishash) != (size_t)EVP_MD_size(c->outdigest) * 2) { logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, c->hostname, "wrong challenge reply length"); return false; @@ -520,7 +520,7 @@ bool send_ack(connection_t *c) { c->options |= OPTION_TCPONLY | OPTION_INDIRECT; } - if(myself->options & OPTION_PMTU_DISCOVERY) { + if(myself->options & OPTION_PMTU_DISCOVERY && !(c->options & OPTION_TCPONLY)) { c->options |= OPTION_PMTU_DISCOVERY; }