X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=6ff68d274cacf0eb842e33ace179913a322257b0;hb=5686ad80b545afa3de9ed2f4176a5346e289aaa8;hp=b326b8d70a1fb75657f95080dec51079fa876ab1;hpb=9e3ca397735077f85bbde48c36e1b3e0fa950988;p=tinc diff --git a/src/protocol_key.c b/src/protocol_key.c index b326b8d7..6ff68d27 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -1,7 +1,7 @@ /* protocol_key.c -- handle the meta-protocol, key exchange Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2010 Guus Sliepen + 2000-2011 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -163,7 +163,7 @@ bool send_ans_key(node_t *to) { // Reset sequence number and late packet window mykeyused = true; to->received_seqno = 0; - memset(to->late, 0, sizeof(to->late)); + if(replaywin) memset(to->late, 0, replaywin); // Convert to hexadecimal and send char key[2 * to->inkeylength + 1]; @@ -310,7 +310,7 @@ bool ans_key_h(connection_t *c) { update_node_udp(from, &sa); } - if(from->options & OPTION_PMTU_DISCOVERY && !from->mtuprobes) + if(from->options & OPTION_PMTU_DISCOVERY && !from->mtuevent) send_mtu_probe(from); return true;