]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Reduce initialisation spam from verb <= 3 and print summary instead
authorArne Schwabe <arne@rfc2549.org>
Tue, 14 Feb 2023 11:20:44 +0000 (12:20 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 3 Mar 2023 16:28:52 +0000 (17:28 +0100)
commitc333a0c05f9d454efb38fc04c1dca1413bfc48ff
tree5d9206f963f44e653b3fa278868e884e37421905
parent155cf11531e619cf24b2aa9d0acb4ff834b2e8fa
Reduce initialisation spam from verb <= 3 and print summary instead

The messages about cipher initialisation are currently very noisy,
especially if tls-auth/tls-crypt is in use.

Typically messages like this is display for AES-256-CBC with SHA256:

   Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
   Outgoing Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication
   Incoming Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
   Incoming Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication

in addition to the tls-crypt/tls-auth messages that has the amount of
messages.

These message are not that helpful. The only meaningful information is
better suited in compat messages. This commit moves the spammy messages
to verb 4 and consistently prints out the cipher/auth used in the data
channel instead on verb 2:

   Data Channel: cipher 'AES-256-CBC' auth 'SHA256'

This patches also summarises other aspects of the imported options for VPN
connection and prints them (even if not coming from pulled options):

    Data Channel: cipher 'AES-256-GCM'
    Timers: ping 8, ping-restart 40
    Protocol options: explicit-exit-notify 1, protocol-flags tls-ekm

And move the OPTIONS IMPORT: xx modified that are included in the new
messages to D_PUSH_DEBUG (verb 7) since they do not add any useful
information anymore.

Patch v2: also compile with compression disabled

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230214112044.1021962-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26249.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/crypto.c
src/openvpn/errlevel.h
src/openvpn/init.c
src/openvpn/occ.h
src/openvpn/sig.c
src/openvpn/ssl.c
src/openvpn/ssl_ncp.c