From: "cron2 (Code Review)" Date: Tue, 5 Aug 2025 13:37:03 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="TxooE3DfBh4="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: clang-format: Switch to ColumnLimit 0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --TxooE3DfBh4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2. cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/11= 29?usp=3Demail ) Change subject: clang-format: Switch to ColumnLimit 0 ...................................................................... clang-format: Switch to ColumnLimit 0 In some cases an actual ColumnLimit leads to unfortunate formatting. So leave the decision to developers after all. This commit contains: - changes that clang-format did as reaction to the config change - manual cleanups of these changes - manual cleanup of some previous changes done with ColumnLimit 100 Change-Id: Ibd900adfc775b7f785f1d5630184a124f5d8ff4b Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20250805132706.27619-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 523.html Signed-off-by: Gert Doering --- M .clang-format M sample/sample-plugins/client-connect/sample-client-connect.c M sample/sample-plugins/log/log_v3.c M sample/sample-plugins/simple/base64.c M src/openvpn/crypto_openssl.c M src/openvpn/errlevel.h M src/openvpn/error.c M src/openvpn/mtu.c M src/openvpn/multi.c M src/openvpn/ntlm.c M src/openvpn/openvpn.c M src/openvpn/options.c M src/openvpn/options.h M src/openvpn/options_util.c M src/openvpn/run_command.h M src/openvpn/ssl_common.h M src/openvpn/xkey_helper.c M src/tapctl/tap.c M tests/unit_tests/openvpn/test_pkt.c 19 files changed, 149 insertions(+), 152 deletions(-) diff --git a/.clang-format b/.clang-format index c314fca..1cce4c3 100644 --- a/.clang-format +++ b/.clang-format @@ -24,7 +24,7 @@ BreakBeforeBraces: Allman BreakBeforeTernaryOperators: true BreakStringLiterals: false -ColumnLimit: '100' +ColumnLimit: '0' ContinuationIndentWidth: '4' DerivePointerAlignment: false IndentCaseLabels: true diff --git a/sample/sample-plugins/client-connect/sample-client-connect.c b= /sample/sample-plugins/client-connect/sample-client-connect.c index 7e3b5a9..eaa07d2 100644 --- a/sample/sample-plugins/client-connect/sample-client-connect.c +++ b/sample/sample-plugins/client-connect/sample-client-connect.c @@ -128,9 +128,8 @@ /* Check API compatibility -- struct version 5 or higher needed */ if (v3structver < 5) { - fprintf( - stderr, - "sample-client-connect: this plugin is incompatible with the r= unning version of OpenVPN\n"); + fprintf(stderr, + "sample-client-connect: this plugin is incompatible with t= he running version of OpenVPN\n"); return OPENVPN_PLUGIN_FUNC_ERROR; } diff --git a/sample/sample-plugins/log/log_v3.c b/sample/sample-plugins/log= /log_v3.c index cef22cf..1b43947 100644 --- a/sample/sample-plugins/log/log_v3.c +++ b/sample/sample-plugins/log/log_v3.c @@ -80,8 +80,7 @@ /* Check that we are API compatible */ if (v3structver !=3D OPENVPN_PLUGINv3_STRUCTVER) { - printf( - "log_v3: ** ERROR ** Incompatible plug-in interface between th= is plug-in and OpenVPN\n"); + printf("log_v3: ** ERROR ** Incompatible plug-in interface between= this plug-in and OpenVPN\n"); return OPENVPN_PLUGIN_FUNC_ERROR; } diff --git a/sample/sample-plugins/simple/base64.c b/sample/sample-plugins/= simple/base64.c index 8a1dedd..8ca0888 100644 --- a/sample/sample-plugins/simple/base64.c +++ b/sample/sample-plugins/simple/base64.c @@ -104,8 +104,7 @@ /* Check that we are API compatible */ if (v3structver !=3D OPENVPN_PLUGINv3_STRUCTVER) { - printf( - "base64.c: ** ERROR ** Incompatible plug-in interface between = this plug-in and OpenVPN\n"); + printf("base64.c: ** ERROR ** Incompatible plug-in interface betwe= en this plug-in and OpenVPN\n"); return OPENVPN_PLUGIN_FUNC_ERROR; } diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index cfea3eb..4fb6393 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -1046,11 +1046,16 @@ * this translation table for forward lookup, only for returning the name * with md_kt_name() */ const cipher_name_pair digest_name_translation_table[] =3D { - { "BLAKE2s256", "BLAKE2S-256" }, { "BLAKE2b512", "BLAKE2B-512" }, - { "RIPEMD160", "RIPEMD-160" }, { "SHA224", "SHA2-224" }, - { "SHA256", "SHA2-256" }, { "SHA384", "SHA2-384" }, - { "SHA512", "SHA2-512" }, { "SHA512-224", "SHA2-512/224" }, - { "SHA512-256", "SHA2-512/256" }, { "SHAKE128", "SHAKE-128" }, + { "BLAKE2s256", "BLAKE2S-256" }, + { "BLAKE2b512", "BLAKE2B-512" }, + { "RIPEMD160", "RIPEMD-160" }, + { "SHA224", "SHA2-224" }, + { "SHA256", "SHA2-256" }, + { "SHA384", "SHA2-384" }, + { "SHA512", "SHA2-512" }, + { "SHA512-224", "SHA2-512/224" }, + { "SHA512-256", "SHA2-512/256" }, + { "SHAKE128", "SHAKE-128" }, { "SHAKE256", "SHAKE-256" }, }; const size_t digest_name_translation_table_count =3D diff --git a/src/openvpn/errlevel.h b/src/openvpn/errlevel.h index 2d33d55..f1ae8c5 100644 --- a/src/openvpn/errlevel.h +++ b/src/openvpn/errlevel.h @@ -49,73 +49,73 @@ * of output. */ -#define M_VERB0 LOGLEV(0, 0, 0) /* Messages displayed even at --verb 0 (fa= tal errors only) */ +#define M_VERB0 LOGLEV(0, 0, 0) /* Messages displayed = even at --verb 0 (fatal errors only) */ -#define M_INFO LOGLEV(1, 0, 0) /* default informational messages */ +#define M_INFO LOGLEV(1, 0, 0) /* default information= al messages */ -#define D_LINK_ERRORS LOGLEV(1, 1, M_NONFATAL) /* show link errors fro= m main event loop */ -#define D_CRYPT_ERRORS LOGLEV(1, 2, M_NONFATAL) /* show errors from enc= rypt/decrypt */ -#define D_TLS_ERRORS LOGLEV(1, 3, M_NONFATAL) /* show TLS control cha= nnel errors */ -#define D_RESOLVE_ERRORS LOGLEV(1, 4, M_NONFATAL) /* show hostname resolv= e errors */ -#define D_COMP_ERRORS LOGLEV(1, 5, M_NONFATAL) /* show compression err= ors */ -#define D_REPLAY_ERRORS LOGLEV(1, 6, M_NONFATAL) /* show packet replay e= rrors */ -#define D_STREAM_ERRORS LOGLEV(1, 7, M_NONFATAL) /* TCP stream error req= uiring restart */ -#define D_IMPORT_ERRORS LOGLEV(1, 8, M_NONFATAL) /* show server import o= ption errors */ -#define D_MULTI_ERRORS LOGLEV(1, 9, M_NONFATAL) /* show multi-client se= rver errors */ -#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] erro= rs */ -#define D_PUSH_ERRORS LOGLEV(1, 11, M_NONFATAL) /* show push/pull error= s */ -#define D_PID_PERSIST LOGLEV(1, 12, M_NONFATAL) /* show packet_id persi= st errors */ -#define D_FRAG_ERRORS LOGLEV(1, 13, M_NONFATAL) /* show fragmentation e= rrors */ -#define D_ALIGN_ERRORS LOGLEV(1, 14, M_NONFATAL) /* show bad struct alig= nments */ +#define D_LINK_ERRORS LOGLEV(1, 1, M_NONFATAL) /* show link errors fr= om main event loop */ +#define D_CRYPT_ERRORS LOGLEV(1, 2, M_NONFATAL) /* show errors from en= crypt/decrypt */ +#define D_TLS_ERRORS LOGLEV(1, 3, M_NONFATAL) /* show TLS control ch= annel errors */ +#define D_RESOLVE_ERRORS LOGLEV(1, 4, M_NONFATAL) /* show hostname resol= ve errors */ +#define D_COMP_ERRORS LOGLEV(1, 5, M_NONFATAL) /* show compression er= rors */ +#define D_REPLAY_ERRORS LOGLEV(1, 6, M_NONFATAL) /* show packet replay = errors */ +#define D_STREAM_ERRORS LOGLEV(1, 7, M_NONFATAL) /* TCP stream error re= quiring restart */ +#define D_IMPORT_ERRORS LOGLEV(1, 8, M_NONFATAL) /* show server import = option errors */ +#define D_MULTI_ERRORS LOGLEV(1, 9, M_NONFATAL) /* show multi-client s= erver errors */ +#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] err= ors */ +#define D_PUSH_ERRORS LOGLEV(1, 11, M_NONFATAL) /* show push/pull erro= rs */ +#define D_PID_PERSIST LOGLEV(1, 12, M_NONFATAL) /* show packet_id pers= ist errors */ +#define D_FRAG_ERRORS LOGLEV(1, 13, M_NONFATAL) /* show fragmentation = errors */ +#define D_ALIGN_ERRORS LOGLEV(1, 14, M_NONFATAL) /* show bad struct ali= gnments */ -#define D_HANDSHAKE LOGLEV(2, 20, 0) /* show data & control = channel handshakes */ -#define D_CLOSE LOGLEV(2, 22, 0) /* show socket and TUN/= TAP close */ -#define D_PROXY LOGLEV(2, 24, 0) /* show http proxy cont= rol packets */ -#define D_ARGV LOGLEV(2, 25, 0) /* show struct argv err= ors */ +#define D_HANDSHAKE LOGLEV(2, 20, 0) /* show data & control= channel handshakes */ +#define D_CLOSE LOGLEV(2, 22, 0) /* show socket and TUN= /TAP close */ +#define D_PROXY LOGLEV(2, 24, 0) /* show http proxy con= trol packets */ +#define D_ARGV LOGLEV(2, 25, 0) /* show struct argv er= rors */ -#define D_TLS_DEBUG_LOW LOGLEV(3, 20, 0) /* low frequency info from = tls_session routines */ -#define D_GREMLIN LOGLEV(3, 30, 0) /* show simulated outage in= fo from gremlin module */ -#define D_GENKEY LOGLEV(3, 31, 0) /* print message after key = generation */ -#define D_ROUTE LOGLEV(3, 0, 0) /* show routes added and de= leted (don't mute) */ -#define D_TUNTAP_INFO LOGLEV(3, 32, 0) /* show debugging info from= TUN/TAP driver */ -#define D_RESTART LOGLEV(3, 33, 0) /* show certain restart mes= sages */ -#define D_PUSH LOGLEV(3, 34, 0) /* show push/pull info */ -#define D_IFCONFIG_POOL LOGLEV(3, 35, 0) /* show ifconfig pool info = */ -#define D_AUTH LOGLEV(3, 37, 0) /* show user/pass auth info= */ -#define D_MULTI_LOW LOGLEV(3, 38, 0) /* show point-to-multipoint= low-freq debug info */ -#define D_PLUGIN LOGLEV(3, 39, 0) /* show plugin calls */ -#define D_MANAGEMENT LOGLEV(3, 40, 0) /* show --management info */ -#define D_SCHED_EXIT LOGLEV(3, 41, 0) /* show arming of scheduled= exit */ -#define D_ROUTE_QUOTA LOGLEV(3, 42, 0) /* show route quota exceede= d messages */ -#define D_OSBUF LOGLEV(3, 43, 0) /* show socket/tun/tap buff= er sizes */ -#define D_PS_PROXY LOGLEV(3, 44, 0) /* messages related to --po= rt-share option */ -#define D_IFCONFIG LOGLEV(3, 0, 0) /* show ifconfig info (don'= t mute) */ -#define D_DCO LOGLEV(3, 0, 0) /* show DCO related message= s */ +#define D_TLS_DEBUG_LOW LOGLEV(3, 20, 0) /* low frequency info = from tls_session routines */ +#define D_GREMLIN LOGLEV(3, 30, 0) /* show simulated outa= ge info from gremlin module */ +#define D_GENKEY LOGLEV(3, 31, 0) /* print message after= key generation */ +#define D_ROUTE LOGLEV(3, 0, 0) /* show routes added a= nd deleted (don't mute) */ +#define D_TUNTAP_INFO LOGLEV(3, 32, 0) /* show debugging info= from TUN/TAP driver */ +#define D_RESTART LOGLEV(3, 33, 0) /* show certain restar= t messages */ +#define D_PUSH LOGLEV(3, 34, 0) /* show push/pull info= */ +#define D_IFCONFIG_POOL LOGLEV(3, 35, 0) /* show ifconfig pool = info */ +#define D_AUTH LOGLEV(3, 37, 0) /* show user/pass auth= info */ +#define D_MULTI_LOW LOGLEV(3, 38, 0) /* show point-to-multi= point low-freq debug info */ +#define D_PLUGIN LOGLEV(3, 39, 0) /* show plugin calls */ +#define D_MANAGEMENT LOGLEV(3, 40, 0) /* show --management i= nfo */ +#define D_SCHED_EXIT LOGLEV(3, 41, 0) /* show arming of sche= duled exit */ +#define D_ROUTE_QUOTA LOGLEV(3, 42, 0) /* show route quota ex= ceeded messages */ +#define D_OSBUF LOGLEV(3, 43, 0) /* show socket/tun/tap= buffer sizes */ +#define D_PS_PROXY LOGLEV(3, 44, 0) /* messages related to= --port-share option */ +#define D_IFCONFIG LOGLEV(3, 0, 0) /* show ifconfig info = (don't mute) */ +#define D_DCO LOGLEV(3, 0, 0) /* show DCO related me= ssages */ -#define D_SHOW_PARMS LOGLEV(4, 50, 0) /* show all parameters on p= rogram initiation */ -#define D_LOW LOGLEV(4, 52, 0) /* miscellaneous low-freque= ncy debug info */ -#define D_DHCP_OPT LOGLEV(4, 53, 0) /* show DHCP options binary= string */ -#define D_MBUF LOGLEV(4, 54, 0) /* mbuf.[ch] routines */ -#define D_PACKET_TRUNC_ERR LOGLEV(4, 55, 0) /* PACKET_TRUNCATION_CHECK = */ -#define D_MULTI_DROPPED LOGLEV(4, 57, 0) /* show point-to-multipoint= packet drops */ -#define D_MULTI_MEDIUM LOGLEV(4, 58, 0) /* show medium frequency mu= lti messages */ -#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attribut= es on connection */ -#define D_INIT_MEDIUM LOGLEV(4, 60, 0) /* show medium frequency in= it messages */ -#define D_MTU_INFO LOGLEV(4, 61, 0) /* show terse MTU info */ -#define D_PID_DEBUG_LOW LOGLEV(4, 63, 0) /* show low-freq packet-id = debugging info */ -#define D_PID_DEBUG_MEDIUM LOGLEV(4, 64, 0) /* show medium-freq packet-= id debugging info */ -#define D_CIPHER_INIT LOGLEV(4, 65, 0) /* show messages about ciph= er init */ +#define D_SHOW_PARMS LOGLEV(4, 50, 0) /* show all parameters= on program initiation */ +#define D_LOW LOGLEV(4, 52, 0) /* miscellaneous low-f= requency debug info */ +#define D_DHCP_OPT LOGLEV(4, 53, 0) /* show DHCP options b= inary string */ +#define D_MBUF LOGLEV(4, 54, 0) /* mbuf.[ch] routines = */ +#define D_PACKET_TRUNC_ERR LOGLEV(4, 55, 0) /* PACKET_TRUNCATION_C= HECK */ +#define D_MULTI_DROPPED LOGLEV(4, 57, 0) /* show point-to-multi= point packet drops */ +#define D_MULTI_MEDIUM LOGLEV(4, 58, 0) /* show medium frequen= cy multi messages */ +#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track att= ributes on connection */ +#define D_INIT_MEDIUM LOGLEV(4, 60, 0) /* show medium frequen= cy init messages */ +#define D_MTU_INFO LOGLEV(4, 61, 0) /* show terse MTU info= */ +#define D_PID_DEBUG_LOW LOGLEV(4, 63, 0) /* show low-freq packe= t-id debugging info */ +#define D_PID_DEBUG_MEDIUM LOGLEV(4, 64, 0) /* show medium-freq pa= cket-id debugging info */ +#define D_CIPHER_INIT LOGLEV(4, 65, 0) /* show messages about= cipher init */ -#define D_LOG_RW LOGLEV(5, 0, 0) /* Print 'R' or 'W' to stdo= ut for read/write */ +#define D_LOG_RW LOGLEV(5, 0, 0) /* Print 'R' or 'W' to= stdout for read/write */ -#define D_RTNL LOGLEV(6, 68, M_DEBUG) /* show RTNL low level oper= ations */ -#define D_LINK_RW LOGLEV(6, 69, M_DEBUG) /* show TCP/UDP reads/write= s (terse) */ -#define D_TUN_RW LOGLEV(6, 69, M_DEBUG) /* show TUN/TAP reads/write= s */ -#define D_TAP_WIN_DEBUG LOGLEV(6, 69, M_DEBUG) /* show TAP-Windows driver = debug info */ -#define D_CLIENT_NAT LOGLEV(6, 69, M_DEBUG) /* show client NAT debug in= fo */ -#define D_XKEY LOGLEV(6, 69, M_DEBUG) /* show xkey-provider debug= info */ -#define D_DCO_DEBUG LOGLEV(6, 69, M_DEBUG) /* show DCO related lowleve= l debug messages */ -#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show signal related debu= g messages */ +#define D_RTNL LOGLEV(6, 68, M_DEBUG) /* show RTNL low level= operations */ +#define D_LINK_RW LOGLEV(6, 69, M_DEBUG) /* show TCP/UDP reads/= writes (terse) */ +#define D_TUN_RW LOGLEV(6, 69, M_DEBUG) /* show TUN/TAP reads/= writes */ +#define D_TAP_WIN_DEBUG LOGLEV(6, 69, M_DEBUG) /* show TAP-Windows dr= iver debug info */ +#define D_CLIENT_NAT LOGLEV(6, 69, M_DEBUG) /* show client NAT deb= ug info */ +#define D_XKEY LOGLEV(6, 69, M_DEBUG) /* show xkey-provider = debug info */ +#define D_DCO_DEBUG LOGLEV(6, 69, M_DEBUG) /* show DCO related lo= wlevel debug messages */ +#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show signal related= debug messages */ #define D_SHOW_KEYS LOGLEV(7, 70, M_DEBUG) /* show data channel e= ncryption keys */ #define D_SHOW_KEY_SOURCE LOGLEV(7, 70, M_DEBUG) /* show data channel k= ey source entropy */ @@ -150,32 +150,32 @@ #define D_SHOW_OCC LOGLEV(7, 74, M_DEBUG) /* show options compat= ibility string */ -#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* show VLAN tagging/un= tagging debug info */ +#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* show VLAN taggi= ng/untagging debug info */ -#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show detailed descri= ption of handshake */ -#define D_TLS_DEBUG_MED LOGLEV(8, 70, M_DEBUG) /* limited info from tl= s_session routines */ -#define D_INTERVAL LOGLEV(8, 70, M_DEBUG) /* show interval.h debu= gging info */ -#define D_SCHEDULER LOGLEV(8, 70, M_DEBUG) /* show scheduler debug= ging info */ -#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show verbose info fr= om gremlin module */ -#define D_REL_DEBUG LOGLEV(8, 70, M_DEBUG) /* show detailed info f= rom reliable routines */ -#define D_EVENT_WAIT LOGLEV(8, 70, M_DEBUG) /* show detailed info f= rom event waits */ -#define D_MULTI_TCP LOGLEV(8, 70, M_DEBUG) /* show debug info from= mtcp.c */ +#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show detailed d= escription of handshake */ +#define D_TLS_DEBUG_MED LOGLEV(8, 70, M_DEBUG) /* limited info fr= om tls_session routines */ +#define D_INTERVAL LOGLEV(8, 70, M_DEBUG) /* show interval.h= debugging info */ +#define D_SCHEDULER LOGLEV(8, 70, M_DEBUG) /* show scheduler = debugging info */ +#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show verbose in= fo from gremlin module */ +#define D_REL_DEBUG LOGLEV(8, 70, M_DEBUG) /* show detailed i= nfo from reliable routines */ +#define D_EVENT_WAIT LOGLEV(8, 70, M_DEBUG) /* show detailed i= nfo from event waits */ +#define D_MULTI_TCP LOGLEV(8, 70, M_DEBUG) /* show debug info= from mtcp.c */ -#define D_TLS_DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed info f= rom TLS routines */ -#define D_COMP LOGLEV(9, 70, M_DEBUG) /* show compression inf= o */ -#define D_READ_WRITE LOGLEV(9, 70, M_DEBUG) /* show all tun/tcp/udp= reads/writes/opens */ -#define D_PACKET_CONTENT LOGLEV(9, 70, M_DEBUG) /* show before/after en= cryption packet content */ -#define D_TLS_NO_SEND_KEY LOGLEV(9, 70, M_DEBUG) /* show when no data ch= annel send-key exists */ -#define D_PID_PERSIST_DEBUG LOGLEV(9, 70, M_DEBUG) /* show packet-id persi= st debugging info */ -#define D_LINK_RW_VERBOSE LOGLEV(9, 70, M_DEBUG) /* increase link reads/= writes verbosity */ -#define D_STREAM_DEBUG LOGLEV(9, 70, M_DEBUG) /* show TCP stream debu= g info */ -#define D_WIN32_IO LOGLEV(9, 70, M_DEBUG) /* win32 I/O debugging = info */ -#define D_PKCS11_DEBUG LOGLEV(9, 70, M_DEBUG) /* show PKCS#11 debuggi= ng */ +#define D_TLS_DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed i= nfo from TLS routines */ +#define D_COMP LOGLEV(9, 70, M_DEBUG) /* show compressio= n info */ +#define D_READ_WRITE LOGLEV(9, 70, M_DEBUG) /* show all tun/tc= p/udp reads/writes/opens */ +#define D_PACKET_CONTENT LOGLEV(9, 70, M_DEBUG) /* show before/aft= er encryption packet content */ +#define D_TLS_NO_SEND_KEY LOGLEV(9, 70, M_DEBUG) /* show when no da= ta channel send-key exists */ +#define D_PID_PERSIST_DEBUG LOGLEV(9, 70, M_DEBUG) /* show packet-id = persist debugging info */ +#define D_LINK_RW_VERBOSE LOGLEV(9, 70, M_DEBUG) /* increase link r= eads/writes verbosity */ +#define D_STREAM_DEBUG LOGLEV(9, 70, M_DEBUG) /* show TCP stream= debug info */ +#define D_WIN32_IO LOGLEV(9, 70, M_DEBUG) /* win32 I/O debug= ging info */ +#define D_PKCS11_DEBUG LOGLEV(9, 70, M_DEBUG) /* show PKCS#11 de= bugging */ -#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper = info */ +#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic sh= aper info */ -#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry debug= ging info */ -#define D_OPENSSL_LOCK LOGLEV(11, 70, M_DEBUG) /* show OpenSSL locks */ +#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry = debugging info */ +#define D_OPENSSL_LOCK LOGLEV(11, 70, M_DEBUG) /* show OpenSSL lo= cks */ /*#define D_THREAD_DEBUG LOGLEV(4, 70, M_DEBUG)*/ /* show pthread de= bug information */ diff --git a/src/openvpn/error.c b/src/openvpn/error.c index dacfa8f..1b98235 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -175,7 +175,7 @@ { openvpn_exit(OPENVPN_EXIT_STATUS_CANNOT_OPEN_DEBUG_FILE); /* exit = point */ } -#else /* ifdef OPENVPN_DEBUG_COMMAND_LINE */ +#else msgfp =3D NULL; #endif } diff --git a/src/openvpn/mtu.c b/src/openvpn/mtu.c index c9d3389..a419e32 100644 --- a/src/openvpn/mtu.c +++ b/src/openvpn/mtu.c @@ -266,7 +266,7 @@ return IP_PMTUDISC_DONT; } msg(M_FATAL, "invalid --mtu-disc type: '%s' -- valid types are 'yes', = 'maybe', or 'no'", name); -#else /* if defined(IP_PMTUDISC_DONT) && defined(IP_PMTUDISC_WANT) && defi= ned(IP_PMTUDISC_DO) */ +#else msg(M_FATAL, MTUDISC_NOT_SUPPORTED_MSG); #endif return -1; /* NOTREACHED */ diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 8b352e9..e1ce32a 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -1006,9 +1006,7 @@ #ifdef PACKET_TRUNCATION_CHECK { - status_printf( - so, - "HEADER,ERRORS,Common Name,TUN Read Trunc,TUN Write Trunc,= Pre-encrypt Trunc,Post-decrypt Trunc"); + status_printf(so, "HEADER,ERRORS,Common Name,TUN Read Trunc,TU= N Write Trunc,Pre-encrypt Trunc,Post-decrypt Trunc"); hash_iterator_init(m->hash, &hi); while ((he =3D hash_iterator_next(&hi))) { diff --git a/src/openvpn/ntlm.c b/src/openvpn/ntlm.c index dc5c93f..c2a93e8 100644 --- a/src/openvpn/ntlm.c +++ b/src/openvpn/ntlm.c @@ -208,7 +208,7 @@ uint8_t ntlmv2_hmacmd5[16]; uint8_t *ntlmv2_blob =3D ntlmv2_response + 16; /* inside ntlmv2_respon= se, length: 128 */ int ntlmv2_blob_size =3D 0; - int phase3_bufpos =3D 0x40; /* offset to next security buffer data to = be added */ + int phase3_bufpos =3D 0x40; /* offset to next secur= ity buffer data to be added */ size_t len; char domain[128]; diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c index f1e1f76..64b4f8c 100644 --- a/src/openvpn/openvpn.c +++ b/src/openvpn/openvpn.c @@ -160,9 +160,7 @@ struct context c; #if PEDANTIC - fprintf( - stderr, - "Sorry, I was built with --enable-pedantic and I am incapable of d= oing any real work!\n"); + fprintf(stderr, "Sorry, I was built with --enable-pedantic and I am in= capable of doing any real work!\n"); return 1; #endif diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 672b954..c54032d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3931,7 +3931,8 @@ * Check file/directory sanity * */ -#ifndef ENABLE_SMALL /* Expect people using the stripped down version to k= now what they do */ +/* Expect people using the stripped down version to know what they do */ +#ifndef ENABLE_SMALL #define CHKACC_FILE (1 << 0) /**< Check for a file/directory presenc= e */ #define CHKACC_DIRPATH (1 << 1) /**< Check for directory presence where= a file should reside */ @@ -6243,7 +6244,7 @@ print_default_gateway(M_INFO, &rgi, &rgi6); openvpn_exit(OPENVPN_EXIT_STATUS_GOOD); /* exit point */ } -#endif /* if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL) */ +#endif else if (streq(p[0], "echo") || streq(p[0], "parameter")) { struct buffer string =3D alloc_buf_gc(OPTION_PARM_SIZE, &gc); diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 51468dd..38e67c8 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -133,16 +133,16 @@ int tls_mtu; /* Maximum MTU for the control channel messages= */ /* Advanced MTU negotiation and datagram fragmentation options */ - int mtu_discover_type; /* used if OS supports setting Path MTU discove= ry options on socket */ + int mtu_discover_type; /* used if OS supports setting Path MT= U discovery options on socket */ - int fragment; /* internal fragmentation size */ - bool fragment_encap; /* true if --fragment had the "mtu" parameter to - * include overhead from IP and TCP/UDP encapsu= lation */ - int mssfix; /* Upper bound on TCP MSS */ - bool mssfix_default; /* true if --mssfix should use the default para= meters */ - bool mssfix_encap; /* true if --mssfix had the "mtu" parameter to = include - * overhead from IP and TCP/UDP encapsulation */ - bool mssfix_fixed; /* use the mssfix value without any encapsulati= on adjustments */ + int fragment; /* internal fragmentation size */ + bool fragment_encap; /* true if --fragment had the "mtu" pa= rameter to + * include overhead from IP and TCP/UD= P encapsulation */ + int mssfix; /* Upper bound on TCP MSS */ + bool mssfix_default; /* true if --mssfix should use the def= ault parameters */ + bool mssfix_encap; /* true if --mssfix had the "mtu" para= meter to include + * overhead from IP and TCP/UDP encaps= ulation */ + bool mssfix_fixed; /* use the mssfix value without any en= capsulation adjustments */ int explicit_exit_notification; /* Explicitly tell peer when we are ex= iting via OCC_EXIT or [RESTART] message */ diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c index 5251b21..c3938a7 100644 --- a/src/openvpn/options_util.c +++ b/src/openvpn/options_util.c @@ -146,14 +146,14 @@ return (int)i; } -static const char *updatable_options[] =3D { "block-ipv6", "block-o= utside-dns", - "dhcp-option", "dns", - "ifconfig", "ifconfig-= ipv6", +static const char *updatable_options[] =3D { "block-ipv6", "block-outside-= dns", + "dhcp-option", "dns", + "ifconfig", "ifconfig-ipv6", "push-continuation", "redirect-= gateway", - "redirect-private", "route", - "route-gateway", "route-ipv= 6", - "route-metric", "topology", - "tun-mtu", "keepalive= " }; + "redirect-private", "route", + "route-gateway", "route-ipv6", + "route-metric", "topology", + "tun-mtu", "keepalive" }; bool check_push_update_option_flags(char *line, int *i, unsigned int *flags) diff --git a/src/openvpn/run_command.h b/src/openvpn/run_command.h index 4b74f22..afd1b88 100644 --- a/src/openvpn/run_command.h +++ b/src/openvpn/run_command.h @@ -27,12 +27,15 @@ #include "env_set.h" /* Script security */ -#define SSEC_NONE 0 /* strictly no calling of external programs */ -#define SSEC_BUILT_IN 1 /* only call built-in programs such as ifconfig, r= oute, netsh, etc.*/ -#define SSEC_SCRIPTS 2 /* allow calling of built-in programs and user-def= ined scripts */ -#define SSEC_PW_ENV = \ - 3 /* allow calling of built-in programs and user-defined scripts that = may receive a password \ - as an environmental variable */ +/** strictly no calling of external programs */ +#define SSEC_NONE 0 +/** only call built-in programs such as ifconfig, route, netsh, etc.*/ +#define SSEC_BUILT_IN 1 +/** allow calling of built-in programs and user-defined scripts */ +#define SSEC_SCRIPTS 2 +/** allow calling of built-in programs and user-defined scripts that may r= eceive a password + as an environmental variable */ +#define SSEC_PW_ENV 3 #define OPENVPN_EXECVE_ERROR -1 /* generic error while forking to r= un an external program */ #define OPENVPN_EXECVE_NOT_ALLOWED -2 /* external program not run due to = script security */ diff --git a/src/openvpn/ssl_common.h b/src/openvpn/ssl_common.h index cd5293a..e8fde86 100644 --- a/src/openvpn/ssl_common.h +++ b/src/openvpn/ssl_common.h @@ -222,15 +222,15 @@ */ uint32_t peer_id; - struct key_state_ssl ks_ssl; /* contains SSL object and BIOs for the c= ontrol channel */ + struct key_state_ssl ks_ssl; /* contains SSL object and BIOs= for the control channel */ - time_t initial; /* when we created this session */ - time_t established; /* when our state went S_ACTIVE */ - time_t must_negotiate; /* key negotiation times out if not finis= hed before this time */ - time_t must_die; /* this object is destroyed at this time = */ - time_t peer_last_packet; /* Last time we received a packet in this= control session */ + time_t initial; /* when we created this session= */ + time_t established; /* when our state went S_ACTIVE= */ + time_t must_negotiate; /* key negotiation times out if= not finished before this time */ + time_t must_die; /* this object is destroyed at = this time */ + time_t peer_last_packet; /* Last time we received a pack= et in this control session */ - int initial_opcode; /* our initial P_ opcode */ + int initial_opcode; /* our initial P_ opcode */ struct session_id session_id_remote; /* peer's random session ID */ struct link_socket_actual remote_addr; /* peer's IP addr */ @@ -579,9 +579,8 @@ enum multi_status { CAS_NOT_CONNECTED, - CAS_WAITING_AUTH, /**< Initial TLS connection established but deferred= auth is not yet finished - */ - CAS_PENDING, /**< Options import (Connect script/plugin, ccd,...)= */ + CAS_WAITING_AUTH, /**< Initial TLS connection established = but deferred auth is not yet finished */ + CAS_PENDING, /**< Options import (Connect script/plug= in, ccd,...) */ CAS_PENDING_DEFERRED, /**< Waiting on an async option import h= andler */ CAS_PENDING_DEFERRED_PARTIAL, /**< at least handler succeeded but anot= her is still pending */ CAS_FAILED, /**< Option import failed or explicitly = denied the client */ diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index f4a9948..3820808 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -329,10 +329,12 @@ =20 #define MAKE_DI(x) { NID_##x, x, sizeof(x) } + /* clang-format off */ DIG_INFO dinfo[] =3D { MAKE_DI(sha1), MAKE_DI(sha256), MAKE_DI(sha384), MAKE_DI= (sha512), MAKE_DI(sha224), MAKE_DI(sha512_224), MAKE_DI(sha512_256), { 0, NU= LL, 0 } }; + /* clang-format on */ size_t out_len =3D 0; bool ret =3D false; diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c index 09be7e8..b633e77 100644 --- a/src/tapctl/tap.c +++ b/src/tapctl/tap.c @@ -225,10 +225,8 @@ delete_device(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DATA pDeviceI= nfoData, _Inout_ LPBOOL pbRebootRequired) { - SP_REMOVEDEVICE_PARAMS params =3D - { - .ClassInstallHeader =3D - { + SP_REMOVEDEVICE_PARAMS params =3D { + .ClassInstallHeader =3D { .cbSize =3D sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction =3D DIF_REMOVE, }, @@ -281,10 +279,8 @@ change_device_state(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DATA pD= eviceInfoData, _In_ BOOL bEnable, _Inout_ LPBOOL pbRebootRequired) { - SP_PROPCHANGE_PARAMS params =3D - { - .ClassInstallHeader =3D - { + SP_PROPCHANGE_PARAMS params =3D { + .ClassInstallHeader =3D { .cbSize =3D sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction =3D DIF_PROPERTYCHANGE, }, @@ -768,10 +764,8 @@ if (dwResult !=3D ERROR_SUCCESS) { /* The adapter was installed. But, the adapter ID was unobtainable= . Clean-up. */ - SP_REMOVEDEVICE_PARAMS removedevice_params =3D - { - .ClassInstallHeader =3D - { + SP_REMOVEDEVICE_PARAMS removedevice_params =3D { + .ClassInstallHeader =3D { .cbSize =3D sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction =3D DIF_REMOVE, }, diff --git a/tests/unit_tests/openvpn/test_pkt.c b/tests/unit_tests/openvpn= /test_pkt.c index 3823d39..65b31e7 100644 --- a/tests/unit_tests/openvpn/test_pkt.c +++ b/tests/unit_tests/openvpn/test_pkt.c @@ -219,7 +219,7 @@ { buf_reset_len(&buf); buf_write(&buf, client_reset_v2_tls_crypt, sizeof(client_reset_v2_= tls_crypt)); - BPTR(&buf)[i] =3D 0x23; + (BPTR(&buf))[i] =3D 0x23; verdict =3D tls_pre_decrypt_lite(&tas, &state, &from, &buf); assert_int_equal(verdict, VERDICT_INVALID); free_tls_pre_decrypt_state(&state); @@ -274,7 +274,7 @@ free_tls_pre_decrypt_state(&state); /* flip a byte in the hmac */ - BPTR(&buf)[20] =3D 0x23; + (BPTR(&buf))[20] =3D 0x23; verdict =3D tls_pre_decrypt_lite(&tas, &state, &from, &buf); assert_int_equal(verdict, VERDICT_INVALID); free_tls_pre_decrypt_state(&state); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1129?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibd900adfc775b7f785f1d5630184a124f5d8ff4b Gerrit-Change-Number: 1129 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: cron2 Gerrit-MessageType: merged --TxooE3DfBh4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: cron2.

cron2 submitted this change.

View Change

clang-format: Switch to ColumnLimit 0

= In some cases an actual ColumnLimit leads to unfortunate
formatting. So = leave the decision to developers after all.

This commit contains: - changes that clang-format did as reaction to the config
change - manual cleanups of these changes
- manual cleanup of some previous = changes done
with ColumnLimit 100

Change-Id: Ibd900adfc775b7f7= 85f1d5630184a124f5d8ff4b
Signed-off-by: Frank Lichtenheld <frank@...1665...= 641...>
Acked-by: Gert Doering <gert@...1296...>
Message-Id:= <20250805132706.27619-1-gert@...1296...>
URL: https://www.mail-ar= chive.com/openvpn-devel@lists.sourceforge.net/msg32523.html
Signed-off-b= y: Gert Doering <gert@...1296...>
---
M .clang-format
M samp= le/sample-plugins/client-connect/sample-client-connect.c
M sample/sample= -plugins/log/log_v3.c
M sample/sample-plugins/simple/base64.c
M src/o= penvpn/crypto_openssl.c
M src/openvpn/errlevel.h
M src/openvpn/error.= c
M src/openvpn/mtu.c
M src/openvpn/multi.c
M src/openvpn/ntlm.cM src/openvpn/openvpn.c
M src/openvpn/options.c
M src/openvpn/optio= ns.h
M src/openvpn/options_util.c
M src/openvpn/run_command.h
M sr= c/openvpn/ssl_common.h
M src/openvpn/xkey_helper.c
M src/tapctl/tap.c=
M tests/unit_tests/openvpn/test_pkt.c
19 files changed, 149 insertio= ns(+), 152 deletions(-)

diff --git a/.clang-format b/.clang-format
index c314fca= ..1cce4c3 100644
--- a/.clang-format
+++ b/= .clang-format
@@ -24,7 +24,7 @@
BreakBefor= eBraces: Allman
BreakBeforeTernaryOperators: true BreakStringLiterals: false
-ColumnLimit: '100'
+ColumnLimit: '0'
Continuation= IndentWidth: '4'
DerivePointerAlignment: false

IndentCaseLabels: true
diff --git a/sample/sa= mple-plugins/client-connect/sample-client-connect.c b/sample/sample-plugins= /client-connect/sample-client-connect.c
index 7e3b5a9..eaa0= 7d2 100644
--- a/sample/sample-plugins/client-connect/sampl= e-client-connect.c
+++ b/sample/sample-plugins/client-conne= ct/sample-client-connect.c
@@ -128,9 +128,8 @@
/* Check API compatibility -- struct version 5 or higher needed */=
if (v3structver < 5)
{=
- fprintf(
<= span style=3D"color: hsl(0, 100%, 40%);">- stderr,
- "sample-client-con= nect: this plugin is incompatible with the running version of OpenVPN\n&quo= t;);
+ fprintf= (stderr,
+ = "sample-client-connect: this plugin is incompatible with the runn= ing version of OpenVPN\n");
return OPENVPN_PL= UGIN_FUNC_ERROR;
}

d= iff --git a/sample/sample-plugins/log/log_v3.c b/sample/sample-plugins/log/= log_v3.c
index cef22cf..1b43947 100644
--- = a/sample/sample-plugins/log/log_v3.c
+++ b/sample/sample-pl= ugins/log/log_v3.c
@@ -80,8 +80,7 @@
/= * Check that we are API compatible */
if (v3structver = !=3D OPENVPN_PLUGINv3_STRUCTVER)
{
- printf(
- "log_v3: ** ERROR ** Incompati= ble plug-in interface between this plug-in and OpenVPN\n");
= + printf("log_v3: *= * ERROR ** Incompatible plug-in interface between this plug-in and OpenVPN\= n");
return OPENVPN_PLUGIN_FUNC_ERROR;=
}

diff --git a/sample/samp= le-plugins/simple/base64.c b/sample/sample-plugins/simple/base64.cindex 8a1dedd..8ca0888 100644
--- a/sample/sample-p= lugins/simple/base64.c
+++ b/sample/sample-plugins/simple/b= ase64.c
@@ -104,8 +104,7 @@
/* Check t= hat we are API compatible */
if (v3structver !=3D OPEN= VPN_PLUGINv3_STRUCTVER)
{
- printf(
- "base64.c: ** ERROR ** Incompatible plu= g-in interface between this plug-in and OpenVPN\n");
+ printf("base64.c: ** ERR= OR ** Incompatible plug-in interface between this plug-in and OpenVPN\n&quo= t;);
return OPENVPN_PLUGIN_FUNC_ERROR;
<= span> }

diff --git a/src/openvpn/cryp= to_openssl.c b/src/openvpn/crypto_openssl.c
index cfea3eb..= 4fb6393 100644
--- a/src/openvpn/crypto_openssl.c+++ b/src/openvpn/crypto_openssl.c
@@ -1046,11 +1046= ,16 @@
* this translation table for forward lookup, only = for returning the name
* with md_kt_name() */
<= span> const cipher_name_pair digest_name_translation_table[] =3D {- { "BLAKE2s256", = "BLAKE2S-256" }, { "BLAKE2b512", "BLAKE2B-512&quo= t; },
- { "RIPE= MD160", "RIPEMD-160" }, { "SHA224", "SHA2-= 224" },
- { &qu= ot;SHA256", "SHA2-256" }, { "SHA384", &quo= t;SHA2-384" },
- = { "SHA512", "SHA2-512" }, { "SHA512-224&= quot;, "SHA2-512/224" },
- { "SHA512-256", "SHA2-512/256" }, { &q= uot;SHAKE128", "SHAKE-128" },
+ { "BLAKE2s256", "BLAKE2S-256&qu= ot; },
+ { "B= LAKE2b512", "BLAKE2B-512" },
+ { "RIPEMD160", "RIPEMD-160"= },
+ { "SHA2= 24", "SHA2-224" },
+ { "SHA256", "SHA2-256" },
<= span style=3D"color: hsl(120, 100%, 40%);">+ { "SHA384", "= ;SHA2-384" },
+ = { "SHA512", "SHA2-512" },
+ { "SHA512-224", "SHA2-512/2= 24" },
+ { &q= uot;SHA512-256", "SHA2-512/256" },
+ { "SHAKE128", "SHAKE-128&q= uot; },
{ "SHAKE256", "SHAKE-256" = },
};
const size_t digest_name_translatio= n_table_count =3D
diff --git a/src/openvpn/errlevel.h b/src= /openvpn/errlevel.h
index 2d33d55..f1ae8c5 100644--- a/src/openvpn/errlevel.h
+++ b/src/openvpn/errle= vel.h
@@ -49,73 +49,73 @@
* of output.

*/

-#define M_VERB0 LOGLEV(0, 0, 0) /* Messages displayed even a= t --verb 0 (fatal errors only) */
+#define M_VERB0 LOGLEV(0, 0, 0) /* Messag= es displayed even at --verb 0 (fatal errors only) */

-#define M_INFO LOGLEV(1, 0= , 0) /* default informational messages */
+#define M_INFO LOGLEV(1, 0, 0) = /* default informational messages */

-#define D_LINK_ERRORS LOGLEV(1, 1, M_NO= NFATAL) /* show link errors from main event loop */
-#define D_CRYPT_ERRORS LOGLEV(1, 2, M_NON= FATAL) /* show errors from encrypt/decrypt */
-#define D_TLS_ERRORS LOGLEV(1, 3, M_NONFATAL) = /* show TLS control channel errors */
-#define D_RESOLVE_ERRORS LOGLEV(1, 4, M_NONFATAL) /* show= hostname resolve errors */
-#define D_COMP_ERRORS LOGLEV(1, 5, M_NONFATAL) /* show compressio= n errors */
-#define D_= REPLAY_ERRORS LOGLEV(1, 6, M_NONFATAL) /* show packet replay errors */
-#define D_STREAM_ERRORS = LOGLEV(1, 7, M_NONFATAL) /* TCP stream error requiring restart */<= br>-#define D_IMPORT_ERRORS LOGL= EV(1, 8, M_NONFATAL) /* show server import option errors */
-#define D_MULTI_ERRORS LOGLEV(1, 9= , M_NONFATAL) /* show multi-client server errors */

-#define D_EVENT_ERRORS LOGLEV(1, 10, M_NO= NFATAL) /* show event.[ch] errors */
-#define D_PUSH_ERRORS LOGLEV(1, 11, M_NONFATAL) /* show p= ush/pull errors */
-#de= fine D_PID_PERSIST LOGLEV(1, 12, M_NONFATAL) /* show packet_id persist e= rrors */
-#define D_FRA= G_ERRORS LOGLEV(1, 13, M_NONFATAL) /* show fragmentation errors */
-#define D_ALIGN_ERRORS LO= GLEV(1, 14, M_NONFATAL) /* show bad struct alignments */
+#define D_LINK_ERRORS LOGLEV(1, 1, = M_NONFATAL) /* show link errors from main event loop */
+#define D_CRYPT_ERRORS LOGLEV(1, 2,= M_NONFATAL) /* show errors from encrypt/decrypt */
+#define D_TLS_ERRORS LOGLEV(1, 3, M_N= ONFATAL) /* show TLS control channel errors */
+#define D_RESOLVE_ERRORS LOGLEV(1, 4, M_NONFAT= AL) /* show hostname resolve errors */
+#define D_COMP_ERRORS LOGLEV(1, 5, M_NONFATAL) /*= show compression errors */
+#define D_REPLAY_ERRORS LOGLEV(1, 6, M_NONFATAL) /* show packet = replay errors */
+#de= fine D_STREAM_ERRORS LOGLEV(1, 7, M_NONFATAL) /* TCP stream error requir= ing restart */
+#defi= ne D_IMPORT_ERRORS LOGLEV(1, 8, M_NONFATAL) /* show server import option= errors */
+#define D= _MULTI_ERRORS LOGLEV(1, 9, M_NONFATAL) /* show multi-client server erro= rs */
+#define D_EVEN= T_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */+#define D_PUSH_ERRORS LOG= LEV(1, 11, M_NONFATAL) /* show push/pull errors */
+#define D_PID_PERSIST LOGLEV(1, 12, M_= NONFATAL) /* show packet_id persist errors */
+#define D_FRAG_ERRORS LOGLEV(1, 13, M_NONFATA= L) /* show fragmentation errors */
+#define D_ALIGN_ERRORS LOGLEV(1, 14, M_NONFATAL) /* show= bad struct alignments */

-#define D_HANDSHAKE LOGLEV(2, 20, 0) /*= show data & control channel handshakes */
-#define D_CLOSE LOGLEV(2, 22, 0) = /* show socket and TUN/TAP close */
-#define D_PROXY LOGLEV(2, 24, 0) /* show h= ttp proxy control packets */
-#define D_ARGV LOGLEV(2, 25, 0) /* show struct ar= gv errors */
+#define= D_HANDSHAKE LOGLEV(2, 20, 0) /* show data & control cha= nnel handshakes */
+#= define D_CLOSE LOGLEV(2, 22, 0) /* show socket and TUN/T= AP close */
+#define = D_PROXY LOGLEV(2, 24, 0) /* show http proxy control pack= ets */
+#define D_ARG= V LOGLEV(2, 25, 0) /* show struct argv errors */=

-#define D_= TLS_DEBUG_LOW LOGLEV(3, 20, 0) /* low frequency info from tls_session= routines */
-#define D= _GREMLIN LOGLEV(3, 30, 0) /* show simulated outage info from gr= emlin module */
-#defin= e D_GENKEY LOGLEV(3, 31, 0) /* print message after key generat= ion */
-#define D_ROUTE= LOGLEV(3, 0, 0) /* show routes added and deleted (don't= mute) */
-#define D_TU= NTAP_INFO LOGLEV(3, 32, 0) /* show debugging info from TUN/TAP driv= er */
-#define D_RESTAR= T LOGLEV(3, 33, 0) /* show certain restart messages */-#define D_PUSH LOGLEV= (3, 34, 0) /* show push/pull info */
-#define D_IFCONFIG_POOL LOGLEV(3, 35, 0) /* show= ifconfig pool info */
= -#define D_AUTH LOGLEV(3, 37, 0) /* show user/pass auth info= */
-#define D_MULTI_LO= W LOGLEV(3, 38, 0) /* show point-to-multipoint low-freq debug inf= o */
-#define D_PLUGIN = LOGLEV(3, 39, 0) /* show plugin calls */
-#define D_MANAGEMENT LOGLEV(3, 40, 0) = /* show --management info */
-#define D_SCHED_EXIT LOGLEV(3, 41, 0) /* show arming of= scheduled exit */
-#de= fine D_ROUTE_QUOTA LOGLEV(3, 42, 0) /* show route quota exceeded me= ssages */
-#define D_OS= BUF LOGLEV(3, 43, 0) /* show socket/tun/tap buffer sizes */
-#define D_PS_PROXY = LOGLEV(3, 44, 0) /* messages related to --port-share option */
-#define D_IFCONFIG LOG= LEV(3, 0, 0) /* show ifconfig info (don't mute) */
-#define D_DCO LOGLEV(3, 0= , 0) /* show DCO related messages */

+#define D_TLS_DEBUG_LOW LOGLEV(3, 20, 0) = /* low frequency info from tls_session routines */
+#define D_GREMLIN LOGLEV(3, 30, 0) = /* show simulated outage info from gremlin module */
<= span style=3D"color: hsl(120, 100%, 40%);">+#define D_GENKEY LOGLEV(= 3, 31, 0) /* print message after key generation */

+#define D_ROUTE LOGLEV(3,= 0, 0) /* show routes added and deleted (don't mute) */
+#define D_TUNTAP_INFO = LOGLEV(3, 32, 0) /* show debugging info from TUN/TAP driver */<= /span>
+#define D_RESTART = LOGLEV(3, 33, 0) /* show certain restart messages */<= br>+#define D_PUSH LOG= LEV(3, 34, 0) /* show push/pull info */
+#define D_IFCONFIG_POOL LOGLEV(3, 35, 0) = /* show ifconfig pool info */
+#define D_AUTH LOGLEV(3, 37, 0) /* sh= ow user/pass auth info */
+#define D_MULTI_LOW LOGLEV(3, 38, 0) /* show point-to-= multipoint low-freq debug info */
+#define D_PLUGIN LOGLEV(3, 39, 0) /* show p= lugin calls */
+#defi= ne D_MANAGEMENT LOGLEV(3, 40, 0) /* show --management info */=
+#define D_SCHED_EXI= T LOGLEV(3, 41, 0) /* show arming of scheduled exit */=
+#define D_ROUTE_QUOTA LO= GLEV(3, 42, 0) /* show route quota exceeded messages */+#define D_OSBUF LOGL= EV(3, 43, 0) /* show socket/tun/tap buffer sizes */
+#define D_PS_PROXY LOGLEV(3= , 44, 0) /* messages related to --port-share option */
+#define D_IFCONFIG LOGLE= V(3, 0, 0) /* show ifconfig info (don't mute) */
= +#define D_DCO LOGLEV= (3, 0, 0) /* show DCO related messages */

-#define D_SHOW_PARMS = LOGLEV(4, 50, 0) /* show all parameters on program initiation */
-#define D_LOW = LOGLEV(4, 52, 0) /* miscellaneous low-frequency debug info */
= -#define D_DHCP_OPT LOGLE= V(4, 53, 0) /* show DHCP options binary string */
-#define D_MBUF LOGLEV(4, 54, 0)= /* mbuf.[ch] routines */
-#define D_PACKET_TRUNC_ERR LOGLEV(4, 55, 0) /* PACKET_TRUNCATION_= CHECK */
-#define D_MUL= TI_DROPPED LOGLEV(4, 57, 0) /* show point-to-multipoint packet drops = */
-#define D_MULTI_MED= IUM LOGLEV(4, 58, 0) /* show medium frequency multi messages */
-#define D_X509_ATTR = LOGLEV(4, 59, 0) /* show x509-track attributes on connection */<= br>-#define D_INIT_MEDIUM LO= GLEV(4, 60, 0) /* show medium frequency init messages */
-#define D_MTU_INFO LOGLEV(4, = 61, 0) /* show terse MTU info */

-#define D_PID_DEBUG_LOW LOGLEV(4, 63, 0) /* show low-fr= eq packet-id debugging info */
-#define D_PID_DEBUG_MEDIUM LOGLEV(4, 64, 0) /* show medium-freq= packet-id debugging info */
-#define D_CIPHER_INIT LOGLEV(4, 65, 0) /* show messages abou= t cipher init */
+#de= fine D_SHOW_PARMS LOGLEV(4, 50, 0) /* show all parameters on = program initiation */
+#define D_LOW LOGLEV(4, 52, 0) /* miscellaneous low-= frequency debug info */
+#define D_DHCP_OPT LOGLEV(4, 53, 0) /* show DHCP option= s binary string */
+#= define D_MBUF LOGLEV(4, 54, 0) /* mbuf.[ch] routines */=
+#define D_PACKET_TR= UNC_ERR LOGLEV(4, 55, 0) /* PACKET_TRUNCATION_CHECK */
+#define D_MULTI_DROPPED LOGLE= V(4, 57, 0) /* show point-to-multipoint packet drops */

<= span style=3D"color: hsl(120, 100%, 40%);">+#define D_MULTI_MEDIUM LOGL= EV(4, 58, 0) /* show medium frequency multi messages */

<= span style=3D"color: hsl(120, 100%, 40%);">+#define D_X509_ATTR LOGL= EV(4, 59, 0) /* show x509-track attributes on connection */
<= br>+#define D_INIT_MEDIUM = LOGLEV(4, 60, 0) /* show medium frequency init messages */+#define D_MTU_INFO L= OGLEV(4, 61, 0) /* show terse MTU info */
+#define D_PID_DEBUG_LOW LOGLEV(4, 63, 0) = /* show low-freq packet-id debugging info */
+#define D_PID_DEBUG_MEDIUM LOGLEV(4, 64, = 0) /* show medium-freq packet-id debugging info */
+#define D_CIPHER_INIT LOGLEV(4,= 65, 0) /* show messages about cipher init */

-#define D_LOG_RW LOGLEV(5= , 0, 0) /* Print 'R' or 'W' to stdout for rea= d/write */
+#define D= _LOG_RW LOGLEV(5, 0, 0) /* Print 'R' or 'W&#= 39; to stdout for read/write */

-#define D_RTNL LOGLEV(6, 68, M_DEBUG) = /* show RTNL low level operations */
-#define D_LINK_RW LOGLEV(6, 69, M_DEBUG) /* show TCP/U= DP reads/writes (terse) */
-#define D_TUN_RW LOGLEV(6, 69, M_DEBUG) /* show TUN/TAP reads/w= rites */
-#define D_TAP= _WIN_DEBUG LOGLEV(6, 69, M_DEBUG) /* show TAP-Windows driver debug info */<= /span>
-#define D_CLIENT_NAT = LOGLEV(6, 69, M_DEBUG) /* show client NAT debug info */
-#define D_XKEY LOGLEV(6, 69, M= _DEBUG) /* show xkey-provider debug info */
-#define D_DCO_DEBUG LOGLEV(6, 69, M_DEBUG) /* sho= w DCO related lowlevel debug messages */
-#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show s= ignal related debug messages */
+#define D_RTNL LOGLEV(6, 68, M_DEBUG) /* show RTN= L low level operations */
+#define D_LINK_RW LOGLEV(6, 69, M_DEBUG) /* show TCP/UDP r= eads/writes (terse) */
+#define = D_TAP_WIN_DEBUG LOGLEV(6, 69, M_DEBUG) /* show TAP-Windows driver debu= g info */
+#define D_= CLIENT_NAT LOGLEV(6, 69, M_DEBUG) /* show client NAT debug info */<= /span>
+#define D_XKEY = LOGLEV(6, 69, M_DEBUG) /* show xkey-provider debug info */<= br>+#define D_DCO_DEBUG LOG= LEV(6, 69, M_DEBUG) /* show DCO related lowlevel debug messages */
+#define D_SIGNAL_DEBUG = LOGLEV(6, 69, M_DEBUG) /* show signal related debug messages */

#define D_SHOW_KEYS LOGLEV(7, 70, M_= DEBUG) /* show data channel encryption keys */
#define D_S= HOW_KEY_SOURCE LOGLEV(7, 70, M_DEBUG) /* show data channel key source en= tropy */
@@ -150,32 +150,32 @@
#define D_S= HOW_OCC LOGLEV(7, 74, M_DEBUG) /* show options compatibility stri= ng */


-#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* s= how VLAN tagging/untagging debug info */
+#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) = /* show VLAN tagging/untagging debug info */

= -#define D_HANDSHAKE_VERBOSE LOGL= EV(8, 70, M_DEBUG) /* show detailed description of handshake */
<= span style=3D"color: hsl(0, 100%, 40%);">-#define D_TLS_DEBUG_MED LOGLE= V(8, 70, M_DEBUG) /* limited info from tls_session routines */

-#define D_INTERVAL LOGLEV= (8, 70, M_DEBUG) /* show interval.h debugging info */

-#define D_SCHEDULER LOGLEV(8, 70, M= _DEBUG) /* show scheduler debugging info */
-#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /*= show verbose info from gremlin module */
-#define D_REL_DEBUG LOGLEV(8, 70, M_DEBUG) /* s= how detailed info from reliable routines */
-#define D_EVENT_WAIT LOGLEV(8, 70, M_DEBUG) /*= show detailed info from event waits */
-#define D_MULTI_TCP LOGLEV(8, 70, M_DEBUG) /* sho= w debug info from mtcp.c */
+#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show det= ailed description of handshake */
+#define D_TLS_DEBUG_MED LOGLEV(8, 70, M_DEBUG) /* li= mited info from tls_session routines */
+#define D_INTERVAL LOGLEV(8, 70, M_DEBUG) = /* show interval.h debugging info */
+#define D_SCHEDULER LOGLEV(8, 70, M_DEBUG) /= * show scheduler debugging info */
+#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* s= how verbose info from gremlin module */
+#define D_REL_DEBUG LOGLEV(8, 70, M_DEBUG) = /* show detailed info from reliable routines */
+#define D_EVENT_WAIT LOGLEV(8, 70, M_DE= BUG) /* show detailed info from event waits */
+#define D_MULTI_TCP LOGLEV(8, 70,= M_DEBUG) /* show debug info from mtcp.c */
-#define D_TLS_DEBUG LO= GLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */
<= span style=3D"color: hsl(0, 100%, 40%);">-#define D_COMP LOGLE= V(9, 70, M_DEBUG) /* show compression info */

-#define D_READ_WRITE LOGLEV(9, 70, M_DEBUG) = /* show all tun/tcp/udp reads/writes/opens */
-#define D_PACKET_CONTENT LOGLEV(9, 70, M_DEBUG) = /* show before/after encryption packet content */
-#define D_TLS_NO_SEND_KEY LOGLEV(9, 70, M_DEB= UG) /* show when no data channel send-key exists */
-#define D_PID_PERSIST_DEBUG LOGLEV(9, 70, M= _DEBUG) /* show packet-id persist debugging info */
-#define D_LINK_RW_VERBOSE LOGLEV(9, 70, M= _DEBUG) /* increase link reads/writes verbosity */
-#define D_STREAM_DEBUG LOGLEV(9, 70, M_DE= BUG) /* show TCP stream debug info */
-#define D_WIN32_IO LOGLEV(9, 70, M_DEBUG) /* win32= I/O debugging info */
= -#define D_PKCS11_DEBUG LOGLEV(9, 70, M_DEBUG) /* show PKCS#11 debuggi= ng */
+#define D_TLS_= DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS ro= utines */
+#define D_= COMP LOGLEV(9, 70, M_DEBUG) /* show compression info */
+#define D_READ_WRITE = LOGLEV(9, 70, M_DEBUG) /* show all tun/tcp/udp reads/writes/ope= ns */
+#define D_PACK= ET_CONTENT LOGLEV(9, 70, M_DEBUG) /* show before/after encryption p= acket content */
+#de= fine D_TLS_NO_SEND_KEY LOGLEV(9, 70, M_DEBUG) /* show when no data c= hannel send-key exists */
+#define D_PID_PERSIST_DEBUG LOGLEV(9, 70, M_DEBUG) /* show packe= t-id persist debugging info */
+#define D_LINK_RW_VERBOSE LOGLEV(9, 70, M_DEBUG) /* incre= ase link reads/writes verbosity */
+#define D_STREAM_DEBUG LOGLEV(9, 70, M_DEBUG) /* s= how TCP stream debug info */
+#define D_WIN32_IO LOGLEV(9, 70, M_DEBUG) /* win32 I= /O debugging info */
= +#define D_PKCS11_DEBUG LOGLEV(9, 70, M_DEBUG) /* show PKCS#11 de= bugging */

-#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic s= haper info */
+#defin= e D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper in= fo */

-#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry debu= gging info */
-#define = D_OPENSSL_LOCK LOGLEV(11, 70, M_DEBUG) /* show OpenSSL locks */<= br>+#define D_REGISTRY LOGL= EV(11, 70, M_DEBUG) /* win32 registry debugging info */
= +#define D_OPENSSL_LOCK LOGLEV(= 11, 70, M_DEBUG) /* show OpenSSL locks */
=
/*#define D_THREAD_DEBUG LOGLEV(4, 70, M_DEBUG)*/ /* show = pthread debug information */

diff --git a= /src/openvpn/error.c b/src/openvpn/error.c
index dacfa8f..1= b98235 100644
--- a/src/openvpn/error.c
+++= b/src/openvpn/error.c
@@ -175,7 +175,7 @@
= {
openvpn_exit(OPENVPN_EXIT_STATUS_CANNOT_OPE= N_DEBUG_FILE); /* exit point */
}
-#else /* ifdef OPENVPN_DEBUG_COMMAND_LINE = */
+#else
<= span> msgfp =3D NULL;

#endif
}=
diff --git a/src/openvpn/mtu.c b/src/openvpn/mtu.c
index c9d3389..a419e32 100644

--- a/src/openvpn/mtu.c
+++ b/src/openvpn/mtu.c
@@ -266,7 +266,7 @@
return IP_PMTUDISC_DONT;
}
msg(M_FATAL, "invalid --mtu-disc type: '%s' -= - valid types are 'yes', 'maybe', or 'no'", na= me);
-#else /* if defin= ed(IP_PMTUDISC_DONT) && defined(IP_PMTUDISC_WANT) && define= d(IP_PMTUDISC_DO) */
= +#else
msg(M_FATAL, MTUDISC_NOT_SUPPORTED_MSG);=
#endif
return -1; /* NOTREACHED */diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 8b352e9..e1ce32a 100644

--- a/src/openvpn/multi.c=
+++ b/src/openvpn/multi.c
@@ -1006,9 +1006= ,7 @@

#ifdef PACKET_TRUNCATION_CHECK
{
- status_printf(
- so,
- "HEADER,ERRORS,Common Name,TUN Read Trunc,TUN Wri= te Trunc,Pre-encrypt Trunc,Post-decrypt Trunc");
+ status_printf(so, "HEADE= R,ERRORS,Common Name,TUN Read Trunc,TUN Write Trunc,Pre-encrypt Trunc,Post-= decrypt Trunc");
hash_iterator_init(m->= ;hash, &hi);
while ((he =3D hash_iterator_= next(&hi)))
{
diff --git a= /src/openvpn/ntlm.c b/src/openvpn/ntlm.c
index dc5c93f..c2a= 93e8 100644
--- a/src/openvpn/ntlm.c
+++ b/= src/openvpn/ntlm.c
@@ -208,7 +208,7 @@
= uint8_t ntlmv2_hmacmd5[16];
uint8_t *ntlmv2_blob =3D = ntlmv2_response + 16; /* inside ntlmv2_response, length: 128 */
<= span> int ntlmv2_blob_size =3D 0;

- int phase3_bufpos =3D 0x40; /* offset to next security = buffer data to be added */
+ int phase3_bufpos =3D 0x40; /* offset to next= security buffer data to be added */
size_t len;

char domain[128];
diff --= git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c
index f= 1e1f76..64b4f8c 100644
--- a/src/openvpn/openvpn.c+++ b/src/openvpn/openvpn.c
@@ -160,9 +160,7 @@
struct context c;

#if = PEDANTIC
- fprintf(<= /span>
- stderr,=
- "Sorry, I was b= uilt with --enable-pedantic and I am incapable of doing any real work!\n&qu= ot;);
+ fprintf(st= derr, "Sorry, I was built with --enable-pedantic and I am incapable of= doing any real work!\n");
return 1;
#endif


diff --git a/src/openvpn/opti= ons.c b/src/openvpn/options.c
index 672b954..c54032d 100644=
--- a/src/openvpn/options.c
+++ b/src/open= vpn/options.c
@@ -3931,7 +3931,8 @@
* Ch= eck file/directory sanity
*
*/-#ifndef ENABLE_SMALL /* Expect= people using the stripped down version to know what they do */
<= span style=3D"color: hsl(120, 100%, 40%);">+/* Expect people using the stri= pped down version to know what they do */

+#ifndef ENABLE_SMALL

#define CHKACC_FILE (1 << 0) /**< Check for a file/direct= ory presence */

#define CHKACC_DIRPATH (1 << 1) /= **< Check for directory presence where a file should reside */@@ -6243,7 +6244,7 @@
print_default_gateway= (M_INFO, &rgi, &rgi6);
openvpn_exit(OPENVP= N_EXIT_STATUS_GOOD); /* exit point */
}
-#endif /* if defined(ENABLE_DEBUG) &= amp;& !defined(ENABLE_SMALL) */

+#endif
else if (streq(p[0], "echo= ") || streq(p[0], "parameter"))
{
struct buffer string =3D alloc_buf_gc(OPTION_PARM_SIZE,= &gc);
diff --git a/src/openvpn/options.h b/src/openvpn= /options.h
index 51468dd..38e67c8 100644
--= - a/src/openvpn/options.h
+++ b/src/openvpn/options.h
@@ -133,16 +133,16 @@
int tls_mtu; = /* Maximum MTU for the control channel messages */

/* Advanced MTU negotiation and datagram fragmentation opt= ions */
- int mtu_di= scover_type; /* used if OS supports setting Path MTU discovery options on s= ocket */
+ int mtu= _discover_type; /* used if OS supports setting Path MTU discovery = options on socket */

- int fragment; /* internal fragmentation size = */
- bool fragment_e= ncap; /* true if --fragment had the "mtu" parameter to- * = include overhead from IP and TCP/UDP encapsulation */
- int mssfix; /* Upper bound o= n TCP MSS */
- bool = mssfix_default; /* true if --mssfix should use the default parameters */<= /span>
- bool mssfix_encap;= /* true if --mssfix had the "mtu" parameter to include
- = * overhead from IP and TCP/UDP encapsulation */
- bool mssfix_fixed; /* use the mssfix val= ue without any encapsulation adjustments */
+ int fragment; /* internal fra= gmentation size */
+ = bool fragment_encap; /* true if --fragment had the "mtu&= quot; parameter to
+ = * include overhead from IP and TCP/UDP = encapsulation */
+ = int mssfix; /* Upper bound on TCP MSS */
+ bool mssfix_default; = /* true if --mssfix should use the default parameters */

+ bool mssfix_encap; = /* true if --mssfix had the "mtu" parameter to include
+ = * overhead from IP and TCP/UDP encapsulation */
+ bool mssfix_fixed; /* = use the mssfix value without any encapsulation adjustments */

int explicit_exit_notification; /* Explicitly tel= l peer when we are exiting via OCC_EXIT or
= [RESTART] message */
diff --git a/s= rc/openvpn/options_util.c b/src/openvpn/options_util.c
inde= x 5251b21..c3938a7 100644
--- a/src/openvpn/options_util.c<= /span>
+++ b/src/openvpn/options_util.c
@@ -146,14= +146,14 @@
return (int)i;
}
-static const= char *updatable_options[] =3D { "block-ipv6", "block= -outside-dns",
- = "dhcp-option", &qu= ot;dns",
- = "ifconfig", "ifc= onfig-ipv6",
+st= atic const char *updatable_options[] =3D { "block-ipv6", "bl= ock-outside-dns",
+ = "ifconfig", "ifconfig-ip= v6",
"= ;push-continuation", "redirect-gateway",
- = "redirect-private", "route",
- = "route-gateway", "route-ipv6",
- = "route-metric", "topology",
- = "tun-mtu", "keepalive" };
+ = "redirect-private", "route",
+ = "route-gateway", "route-ipv6",
+ = "route-metric", "topology",
+ &q= uot;tun-mtu", "keepalive" };

bool

check_push_update_option_flags(char *line, int *i= , unsigned int *flags)
diff --git a/src/openvpn/run_command= .h b/src/openvpn/run_command.h
index 4b74f22..afd1b88 10064= 4
--- a/src/openvpn/run_command.h
+++ b/src= /openvpn/run_command.h
@@ -27,12 +27,15 @@
= #include "env_set.h"

/* Scrip= t security */
-#define = SSEC_NONE 0 /* strictly no calling of external programs */
-#define SSEC_BUILT_IN 1 /* only ca= ll built-in programs such as ifconfig, route, netsh, etc.*/

-#define SSEC_SCRIPTS 2 /* allow call= ing of built-in programs and user-defined scripts */

-#define SSEC_PW_ENV = \
- 3 /* allow calling of built-in progra= ms and user-defined scripts that may receive a password \
- as an environmental variable *= /
+/** strictly no ca= lling of external programs */
+#define SSEC_NONE 0
+/** only call built-in programs such as ifconfig, route, nets= h, etc.*/
+#define SS= EC_BUILT_IN 1
+/** al= low calling of built-in programs and user-defined scripts */
+#define SSEC_SCRIPTS 2

= +/** allow calling of built-in = programs and user-defined scripts that may receive a password
+ as an environmental variable = */

+#define SSEC_PW_E= NV 3

#define OPENVPN_EXECVE_ERROR = -1 /* generic error while forking to run an external program */ #define OPENVPN_EXECVE_NOT_ALLOWED -2 /* external program not run= due to script security */
diff --git a/src/openvpn/ssl_com= mon.h b/src/openvpn/ssl_common.h
index cd5293a..e8fde86 100= 644
--- a/src/openvpn/ssl_common.h
+++ b/sr= c/openvpn/ssl_common.h
@@ -222,15 +222,15 @@
*/

uint32_t peer_id;
<= br>- struct key_state_ssl ks_s= sl; /* contains SSL object and BIOs for the control channel */
+ struct key_state_ssl ks_ssl;= /* contains SSL object and BIOs for the control channel */

- time_= t initial; /* when we created this session */
- time_t established; /* wh= en our state went S_ACTIVE */
- time_t must_negotiate; /* key negotiation times out if no= t finished before this time */
- time_t must_die; /* this object is destroyed at th= is time */
- time_t = peer_last_packet; /* Last time we received a packet in this control ses= sion */
+ time_t i= nitial; /* when we created this session */+ time_t established; = /* when our state went S_ACTIVE */
+ time_t must_negotiate; /* = key negotiation times out if not finished before this time */
+ time_t must_die; = /* this object is destroyed at this time */
+ time_t peer_last_packet; = /* Last time we received a packet in this control session */

- int initial_= opcode; /* our initial P_ opcode */
+ int initial_opcode; /* our = initial P_ opcode */
struct session_id session_id_remo= te; /* peer's random session ID */
struct link_s= ocket_actual remote_addr; /* peer's IP addr */
=
@@ -579,9 +579,8 @@
enum multi_status
= {
CAS_NOT_CONNECTED,
- CAS_WAITING_AUTH, /**< Initial TLS connec= tion established but deferred auth is not yet finished
- */
- CAS_PENDING, /**< Options = import (Connect script/plugin, ccd,...) */
+ CAS_WAITING_AUTH, /**< Initial TL= S connection established but deferred auth is not yet finished */+ CAS_PENDING, = /**< Options import (Connect script/plugin, ccd,...) */
<= span> CAS_PENDING_DEFERRED, /**< Waiting on an async option = import handler */
CAS_PENDING_DEFERRED_PARTIAL, /**<= ; at least handler succeeded but another is still pending */
CAS_FAILED, /**< Option import failed or explic= itly denied the client */
diff --git a/src/openvpn/xkey_hel= per.c b/src/openvpn/xkey_helper.c
index f4a9948..3820808 10= 0644
--- a/src/openvpn/xkey_helper.c
+++ b/= src/openvpn/xkey_helper.c
@@ -329,10 +329,12 @@
<= span>
#define MAKE_DI(x) { NID_##x, x, sizeof(x) }=

+ /* c= lang-format off */
DIG_INFO dinfo[] =3D {
MAKE_DI(sha1), MAKE_DI(sha256), MAKE_DI(sha384), MAK= E_DI(sha512),
MAKE_DI(sha224), MAKE_DI(sha512_224)= , MAKE_DI(sha512_256), { 0, NULL, 0 }
};
+ /* clang-format on */<= br>
size_t out_len =3D 0;
= bool ret =3D false;
diff --git a/src/tapctl/tap.c b/src/tap= ctl/tap.c
index 09be7e8..b633e77 100644
---= a/src/tapctl/tap.c
+++ b/src/tapctl/tap.c
= @@ -225,10 +225,8 @@
delete_device(_In_ HDEVINFO hDeviceIn= foSet, _In_ PSP_DEVINFO_DATA pDeviceInfoData,
= _Inout_ LPBOOL pbRebootRequired)
{
- SP_REMOVEDEVICE_PARAMS params =3D
- {
- .ClassInstallHeader =3D
<= span style=3D"color: hsl(0, 100%, 40%);">- {

+ SP_REMOVEDEVICE_PARAMS params =3D {
+ .ClassInstall= Header =3D {
.cbSize =3D sizeof(SP_CLASSINSTAL= L_HEADER),
.InstallFunction =3D DIF_REMOVE,

},
@@ -281,10 +279,8 @@
change_device_state(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DAT= A pDeviceInfoData,
_In_ BOOL bEnable, = _Inout_ LPBOOL pbRebootRequired)
{
- SP_PROPCHANGE_PARAMS params =3D<= br>- {
- .ClassInstallHeader =3D
<= span style=3D"color: hsl(0, 100%, 40%);">- {
+ SP_PROPCHANGE_PARAMS params =3D {

+ .ClassInstallHe= ader =3D {
.cbSize =3D sizeof(SP_CLASSINSTALL_= HEADER),
.InstallFunction =3D DIF_PROPERTYCHAN= GE,
},
@@ -768,10 +764,8 @@=
if (dwResult !=3D ERROR_SUCCESS)
{
/* The adapter was installed. But, the adapter ID was = unobtainable. Clean-up. */
- SP_REMOVEDEVICE_PARAMS removedevice_params =3D
- {

- .ClassInstallHeader =3D
- {
+ SP_REMOVEDEVICE_PARAMS removedevi= ce_params =3D {
+ = .ClassInstallHeader =3D {
.cbSize = =3D sizeof(SP_CLASSINSTALL_HEADER),
.Insta= llFunction =3D DIF_REMOVE,
},
= diff --git a/tests/unit_tests/openvpn/test_pkt.c b/tests/unit_tests/openvpn= /test_pkt.c
index 3823d39..65b31e7 100644
-= -- a/tests/unit_tests/openvpn/test_pkt.c
+++ b/tests/unit_t= ests/openvpn/test_pkt.c
@@ -219,7 +219,7 @@
{
buf_reset_len(&buf);
= buf_write(&buf, client_reset_v2_tls_crypt, sizeof(client_reset_= v2_tls_crypt));
- = BPTR(&buf)[i] =3D 0x23;
+ (BPTR(&buf))[i] =3D 0x23;
ve= rdict =3D tls_pre_decrypt_lite(&tas, &state, &from, &buf);<= /span>
assert_int_equal(verdict, VERDICT_INVALID);=
free_tls_pre_decrypt_state(&state);
= @@ -274,7 +274,7 @@
free_tls_pre_decrypt_state(&st= ate);

/* flip a byte in the hmac */<= /span>
- BPTR(&buf)[20]= =3D 0x23;
+ (BPTR= (&buf))[20] =3D 0x23;
verdict =3D tls_pre_decrypt_= lite(&tas, &state, &from, &buf);
asser= t_int_equal(verdict, VERDICT_INVALID);
free_tls_pre_de= crypt_state(&state);

To view, visit= change = 1129. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibd900adfc775b7f785f1d563018= 4a124f5d8ff4b
Gerrit-Change-Number: 1129
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: cron2 <gert@...1296...>= ;
Gerrit-MessageType: merged
--TxooE3DfBh4=--