]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix '--inactive <time> 0' behavior for DCO
authorLev Stipakov <lev@openvpn.net>
Wed, 22 Mar 2023 11:34:08 +0000 (13:34 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 22 Mar 2023 12:46:52 +0000 (13:46 +0100)
commit6c64b46b15476351ca19f9a8f3cb8185aa2c7e07
tree00eb94ddb9d8837fdd2724ca44edd5d3924d3bdd
parent424ae5906388af8769ae448080fa3b7ec266e8d8
Fix '--inactive <time> 0' behavior for DCO

Make sure we exit if <bytes> is 0 (not set) and no traffic
was produced.

According to man page and non-DCO --inactive implementation,
we exit if amount of bytes produced is less than <bytes> specified.
DCO implementation will do off-by-ones, but we consider it as okay
since we don't want to complicate code to handle both bytes=0 and >0
cases.

Change-Id: I4c089e486728a43bfe42596787c00355838311da
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230322113408.2057-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/search?l=mid&q=20230322113408.2057-1-lstipakov@gmail.com
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c