]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Always include ACKs for the last seen control packets
authorArne Schwabe <arne@rfc2549.org>
Wed, 31 Aug 2022 13:41:39 +0000 (15:41 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 6 Nov 2022 09:13:21 +0000 (10:13 +0100)
commitc879609534e455471bc1e8091c78cbd9427d402b
tree28d3c1e312fd85bcabc20f37f4fba38e8d4e7df9
parent5f6ea5975927627680c21c10670ccb8503f18249
Always include ACKs for the last seen control packets

This adds an MRU cache for the last seen packets from the peer to send acks
to all recently recently  packets. This allows packets to be acknowledged
even if a single P_ACK_V1 gets lost, avoiding retransmissions. The downside
is that we add up to 28 byte to an P_ACK_V1 (7* packet_id) and up to 24
bytes to other control channel packets (4* packet_id + peer session id).
However these small increases in packet size are a small price to pay for
increased reliability.

Currently OpenVPN will only send the absolute minimum of ACK messages. A
single lost ACK message will trigger a resend from the peer and another
ACK message.

Patch v2: fix multiple typos/grammar. Change lru to mru (this is really an
          MRU cache), add more unit test cases

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20220831134140.913337-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25143.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/reliable.c
src/openvpn/reliable.h
src/openvpn/ssl.c
src/openvpn/ssl_common.h
src/openvpn/ssl_pkt.c
tests/unit_tests/openvpn/test_packet_id.c