From: Guus Sliepen Date: Thu, 14 May 2015 22:21:48 +0000 (+0200) Subject: Fix receiving UDP packets from tinc 1.0.x nodes. X-Git-Tag: release-1.1pre12~163 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=fd1cff6df23c3f16a46edaff8a52a7212914b2f0;p=tinc Fix receiving UDP packets from tinc 1.0.x nodes. In try_mac(), the wrong offsets were used into the packet buffer, causing the digest verification to always fail. --- diff --git a/src/net_packet.c b/src/net_packet.c index 1fdc0fe8..f734af29 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -260,7 +260,7 @@ static bool try_mac(node_t *n, const vpn_packet_t *inpkt) { if(!n->status.validkey_in || !digest_active(n->indigest) || inpkt->len < sizeof(seqno_t) + digest_length(n->indigest)) return false; - return digest_verify(n->indigest, SEQNO(inpkt), inpkt->len - digest_length(n->indigest), DATA(inpkt) + inpkt->len - digest_length(n->indigest)); + return digest_verify(n->indigest, inpkt->data, inpkt->len - digest_length(n->indigest), inpkt->data + inpkt->len - digest_length(n->indigest)); #endif }