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.
This commit is contained in:
Guus Sliepen 2015-05-15 00:21:48 +02:00
parent 44e9f1e1d8
commit fd1cff6df2

View file

@ -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
}