Count the number of correctly received UDP packets.
Keep track of the number of correct, non-replayed UDP packets that have been received, regardless of their content. This can be compared to the sequence number to determine the real packet loss.
This commit is contained in:
parent
b50a92d0c3
commit
eef25266cb
5 changed files with 9 additions and 0 deletions
|
|
@ -365,6 +365,8 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
|
|||
if(inpkt->seqno > n->received_seqno)
|
||||
n->received_seqno = inpkt->seqno;
|
||||
|
||||
n->received++;
|
||||
|
||||
if(n->received_seqno > MAX_SEQNO)
|
||||
regenerate_key();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue