From: Guus Sliepen Date: Mon, 8 Nov 2004 22:30:13 +0000 (+0000) Subject: Fixed another bug in late packet handling. X-Git-Tag: release-1.0.3~14 X-Git-Url: https://git.librecmc.org/?p=oweals%2Ftinc.git;a=commitdiff_plain;h=f7b9761000000063bd00460af4b57117db7361e4 Fixed another bug in late packet handling. --- diff --git a/src/net_packet.c b/src/net_packet.c index 2a3e5f2..ac0a3db 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -242,8 +242,10 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) } } - n->received_seqno = inpkt->seqno; - n->late[(n->received_seqno / 8) % sizeof(n->late)] &= ~(1 << n->received_seqno % 8); + n->late[(inpkt->seqno / 8) % sizeof(n->late)] &= ~(1 << inpkt->seqno % 8); + + if(n->received_seqno > inpkt->seqno) + n->received_seqno = inpkt->seqno; if(n->received_seqno > MAX_SEQNO) keyexpires = 0;