Change in openvpn[master]: Manually reformat some long trailing comments
A message that is not in the archive (sent off-list or not yet received): gerrit.1730392980000.I7f0ba2261b61f6eed511cbd8bb2e880d774d1365@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/792?usp=email
to review the following change.
Change subject: Manually reformat some long trailing comments
......................................................................
Manually reformat some long trailing comments
When trying to reformat the code with a formatter
that actually checks line-lengths, these never
come out nice otherwise.
---
M sample/sample-plugins/simple/base64.c
M src/openvpn/comp.h
M src/openvpn/errlevel.h
M src/openvpn/fragment.h
M src/openvpn/init.c
M src/openvpn/manage.c
M src/openvpn/misc.h
M src/openvpn/options.c
M src/openvpn/ssl_common.h
9 files changed, 152 insertions(+), 134 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/92/792/12
sample/sample-plugins/simple/base64.c +8 -4
@@ -31,10 +31,14 @@#define PLUGIN_NAME "base64.c"/* Exported plug-in v3 API functions */ -plugin_log_t ovpn_log =NULL ;/**< Pointer to the OpenVPN log function. See plugin_log() */ -plugin_vlog_t ovpn_vlog =NULL ;/**< Pointer to the OpenVPN vlog function. See plugin_vlog() */ -plugin_base64_encode_t ovpn_base64_encode =NULL ;/**< Pointer to the openvpn_base64_encode () function */ -plugin_base64_decode_t ovpn_base64_decode =NULL ;/**< Pointer to the openvpn_base64_decode () function */ +/** Pointer to the OpenVPN log function. See plugin_log() */ +plugin_log_t ovpn_log =NULL ; +/** Pointer to the OpenVPN vlog function. See plugin_vlog() */ +plugin_vlog_t ovpn_vlog =NULL ; +/** Pointer to the openvpn_base64_encode () function */ +plugin_base64_encode_t ovpn_base64_encode =NULL ; +/** Pointer to the openvpn_base64_decode () function */ +plugin_base64_decode_t ovpn_base64_decode =NULL ;/** * Search the environment pointer for a specific env var name
src/openvpn/comp.h +20 -12
@@ -36,20 +36,27 @@#define COMP_F_ADAPTIVE (1<<0) / * COMP_ALG_LZO only * / #define COMP_F_ALLOW_COMPRESS (1<<1) / * not only incoming is compressed but also outgoing * / */ -#define COMP_F_SWAP (1<<2)/* initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3)/* tell server that we only support compression stubs */ -#define COMP_F_ALLOW_STUB_ONLY (1<<4)/* Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY -* we still accept other compressions to be pushed */ -#define COMP_F_MIGRATE (1<<5)/* push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_ALLOW_ASYM (1<<6)/* Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* Do not allow compression framing (breaks DCO) */ +/** initial command byte is swapped with last byte in buffer to preserve payload alignment */ +#define COMP_F_SWAP (1<<2) +/** tell server that we only support compression stubs */ +#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3) +/** Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY +* we still accept other compressions to be pushed */ +#define COMP_F_ALLOW_STUB_ONLY (1<<4) +/** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ +#define COMP_F_MIGRATE (1<<5) +/** Compression was explicitly set to allow asymetric compression */ +#define COMP_F_ALLOW_ASYM (1<<6) +/** Do not allow compression framing (breaks DCO) */ +#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* algorithms */ #define COMP_ALG_UNDEF 0 -#define COMP_ALG_STUB 1/* support compression command byte and framing without actual compression */ -#define COMP_ALG_LZO 2/* LZO algorithm */ -#define COMP_ALG_SNAPPY 3/* Snappy algorithm (no longer supported) */ -#define COMP_ALG_LZ4 4/* LZ4 algorithm */ +/** support compression command byte and framing without actual compression */ +#define COMP_ALG_STUB 1 +#define COMP_ALG_LZO 2/**< LZO algorithm */ +#define COMP_ALG_SNAPPY 3/**< Snappy algorithm (no longer supported) */ +#define COMP_ALG_LZ4 4/**< LZ4 algorithm */ /* algorithm v2 */
@@ -106,7 +113,8 @@#define LZO_COMPRESS_BYTE 0x66#define LZ4_COMPRESS_BYTE 0x69#define NO_COMPRESS_BYTE 0xFA -#define NO_COMPRESS_BYTE_SWAP 0xFB/* to maintain payload alignment, replace this byte with last byte of packet */ +/** to maintain payload alignment, replace this byte with last byte of packet */ +#define NO_COMPRESS_BYTE_SWAP 0xFB/* V2 on wire code */ #define COMP_ALGV2_INDICATOR_BYTE 0x50
src/openvpn/errlevel.h +3 -3
@@ -143,7 +143,7 @@#define D_PACKET_TRUNC_DEBUG LOGLEV(7, 70, M_DEBUG)/* PACKET_TRUNCATION_CHECK verbose */ #define D_PING LOGLEV(7, 70, M_DEBUG)/* PING send/receive messages */ #define D_PS_PROXY_DEBUG LOGLEV(7, 70, M_DEBUG)/* port share proxy debug */ -#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show information on key selection for data channel */ +#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show key selection for data channel */ #define D_ARGV_PARSE_CMD LOGLEV(7, 70, M_DEBUG)/* show parse_line() errors in argv_parse_cmd */ #define D_CRYPTO_DEBUG LOGLEV(7, 70, M_DEBUG)/* show detailed info from crypto.c routines */ #define D_PID_DEBUG LOGLEV(7, 70, M_DEBUG)/* show packet-id debugging info */
@@ -153,7 +153,7 @@#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG)/* show VLAN tagging/untagging debug info */ -#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of each handshake */ +#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of handshake */ #define D_TLS_DEBUG_MED LOGLEV(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 */
@@ -168,7 +168,7 @@#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_DEBUG)/* 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)/* show link reads/writes with greater verbosity */ +#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 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 debugging */
src/openvpn/fragment.h +49 -60
150 lines not on this page · raw message
src/openvpn/init.c +6 -3
@@ -983,7 +983,8 @@ {if (!options->dev && options->dev_node) { -char *dev_node =string_alloc (options->dev_node,NULL );/* POSIX basename() implementations may modify its arguments */ +/* POSIX basename() implementations may modify its arguments */ +char *dev_node =string_alloc (options->dev_node,NULL ); options->dev =basename (dev_node); } }
@@ -2566,12 +2567,14 @@ }else { -initialization_sequence_completed (c, error_flags);/* client/p2p --route-delay undefined */ +/* client/p2p --route-delay undefined */ +initialization_sequence_completed (c, error_flags); } }else if (c->options.mode ==MODE_POINT_TO_POINT ) { -initialization_sequence_completed (c, error_flags);/* client/p2p restart with --persist-tun */ +/* client/p2p restart with --persist-tun */ +initialization_sequence_completed (c, error_flags); }tls_print_deferred_options_results (c);
src/openvpn/manage.c +6 -3
@@ -3447,7 +3447,8 @@const bool standalone_disabled_save = man->persist.standalone_disabled;time_t expire =0 ; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false;/* set expire time */ update_time ();
@@ -3510,7 +3511,8 @@unsigned int up_query_mode =0 ;const char *sc =NULL ; ret = true; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ;CLEAR (man->connection.up_query);
@@ -3634,7 +3636,8 @@if (man_standalone_ok (man)) { - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ; *state =EKS_SOLICIT ;
src/openvpn/misc.h +7 -5
@@ -114,12 +114,14 @@#define GET_USER_PASS_NEED_STR (1<<5)#define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6) -#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/* CRV1 protocol -- dynamic challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/* SCRV1 protocol -- static challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/* SCRV1 protocol -- echo response */ +#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/**< CRV1 protocol -- dynamic challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/**< SCRV1 protocol -- static challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/**< SCRV1 protocol -- echo response */ -#define GET_USER_PASS_INLINE_CREDS (1<<10)/* indicates that auth_file is actually inline creds */ -#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/* indicates password and response should be concatenated */ +/** indicates that auth_file is actually inline creds */ +#define GET_USER_PASS_INLINE_CREDS (1<<10) +/** indicates password and response should be concatenated */ +#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/** * Retrieves the user credentials from various sources depending on the flags.
src/openvpn/options.c +2 -1
@@ -853,7 +853,8 @@ o->tuntap_options.ip_win32_type =IPW32_SET_DHCP_MASQ ;#endif o->tuntap_options.dhcp_lease_time =31536000 ;/* one year */ - o->tuntap_options.dhcp_masq_offset =0 ;/* use network address as internal DHCP server address */ +/* use network address as internal DHCP server address */ + o->tuntap_options.dhcp_masq_offset =0 ; o->route_method =ROUTE_METHOD_ADAPTIVE ; o->block_outside_dns = false; o->windows_driver =WINDOWS_DRIVER_UNSPECIFIED ;
src/openvpn/ssl_common.h +51 -43
140 lines not on this page · raw message
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/792?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f0ba2261b61f6eed511cbd8bb2e880d774d1365
Gerrit-Change-Number: 792
Gerrit-PatchSet: 12
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/792?usp=email )
Change subject: Manually reformat some long trailing comments
......................................................................
Patch Set 16: Code-Review+2
(1 comment)
Patchset:
PS16:
looks reasonable, tests pass ("no stray accidents")
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/792?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f0ba2261b61f6eed511cbd8bb2e880d774d1365
Gerrit-Change-Number: 792
Gerrit-PatchSet: 16
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 05 May 2025 10:54:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v16 1/1 Manually reformat some long trailing comments
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
When trying to reformat the code with a formatter
that actually checks line-lengths, these never
come out nice otherwise.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/792
This mail reflects revision 16 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
sample/sample-plugins/simple/base64.c +8 -4
@@ -31,10 +31,14 @@#define PLUGIN_NAME "base64.c"/* Exported plug-in v3 API functions */ -plugin_log_t ovpn_log =NULL ;/**< Pointer to the OpenVPN log function. See plugin_log() */ -plugin_vlog_t ovpn_vlog =NULL ;/**< Pointer to the OpenVPN vlog function. See plugin_vlog() */ -plugin_base64_encode_t ovpn_base64_encode =NULL ;/**< Pointer to the openvpn_base64_encode () function */ -plugin_base64_decode_t ovpn_base64_decode =NULL ;/**< Pointer to the openvpn_base64_decode () function */ +/** Pointer to the OpenVPN log function. See plugin_log() */ +plugin_log_t ovpn_log =NULL ; +/** Pointer to the OpenVPN vlog function. See plugin_vlog() */ +plugin_vlog_t ovpn_vlog =NULL ; +/** Pointer to the openvpn_base64_encode () function */ +plugin_base64_encode_t ovpn_base64_encode =NULL ; +/** Pointer to the openvpn_base64_decode () function */ +plugin_base64_decode_t ovpn_base64_decode =NULL ;/** * Search the environment pointer for a specific env var name
src/openvpn/comp.h +20 -12
@@ -36,20 +36,27 @@#define COMP_F_ADAPTIVE (1<<0) / * COMP_ALG_LZO only * / #define COMP_F_ALLOW_COMPRESS (1<<1) / * not only incoming is compressed but also outgoing * / */ -#define COMP_F_SWAP (1<<2)/* initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3)/* tell server that we only support compression stubs */ -#define COMP_F_ALLOW_STUB_ONLY (1<<4)/* Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY -* we still accept other compressions to be pushed */ -#define COMP_F_MIGRATE (1<<5)/* push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_ALLOW_ASYM (1<<6)/* Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* Do not allow compression framing (breaks DCO) */ +/** initial command byte is swapped with last byte in buffer to preserve payload alignment */ +#define COMP_F_SWAP (1<<2) +/** tell server that we only support compression stubs */ +#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3) +/** Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY +* we still accept other compressions to be pushed */ +#define COMP_F_ALLOW_STUB_ONLY (1<<4) +/** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ +#define COMP_F_MIGRATE (1<<5) +/** Compression was explicitly set to allow asymetric compression */ +#define COMP_F_ALLOW_ASYM (1<<6) +/** Do not allow compression framing (breaks DCO) */ +#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* algorithms */ #define COMP_ALG_UNDEF 0 -#define COMP_ALG_STUB 1/* support compression command byte and framing without actual compression */ -#define COMP_ALG_LZO 2/* LZO algorithm */ -#define COMP_ALG_SNAPPY 3/* Snappy algorithm (no longer supported) */ -#define COMP_ALG_LZ4 4/* LZ4 algorithm */ +/** support compression command byte and framing without actual compression */ +#define COMP_ALG_STUB 1 +#define COMP_ALG_LZO 2/**< LZO algorithm */ +#define COMP_ALG_SNAPPY 3/**< Snappy algorithm (no longer supported) */ +#define COMP_ALG_LZ4 4/**< LZ4 algorithm */ /* algorithm v2 */
@@ -106,7 +113,8 @@#define LZO_COMPRESS_BYTE 0x66#define LZ4_COMPRESS_BYTE 0x69#define NO_COMPRESS_BYTE 0xFA -#define NO_COMPRESS_BYTE_SWAP 0xFB/* to maintain payload alignment, replace this byte with last byte of packet */ +/** to maintain payload alignment, replace this byte with last byte of packet */ +#define NO_COMPRESS_BYTE_SWAP 0xFB/* V2 on wire code */ #define COMP_ALGV2_INDICATOR_BYTE 0x50
src/openvpn/errlevel.h +3 -3
@@ -143,7 +143,7 @@#define D_PACKET_TRUNC_DEBUG LOGLEV(7, 70, M_DEBUG)/* PACKET_TRUNCATION_CHECK verbose */ #define D_PING LOGLEV(7, 70, M_DEBUG)/* PING send/receive messages */ #define D_PS_PROXY_DEBUG LOGLEV(7, 70, M_DEBUG)/* port share proxy debug */ -#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show information on key selection for data channel */ +#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show key selection for data channel */ #define D_ARGV_PARSE_CMD LOGLEV(7, 70, M_DEBUG)/* show parse_line() errors in argv_parse_cmd */ #define D_CRYPTO_DEBUG LOGLEV(7, 70, M_DEBUG)/* show detailed info from crypto.c routines */ #define D_PID_DEBUG LOGLEV(7, 70, M_DEBUG)/* show packet-id debugging info */
@@ -153,7 +153,7 @@#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG)/* show VLAN tagging/untagging debug info */ -#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of each handshake */ +#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of handshake */ #define D_TLS_DEBUG_MED LOGLEV(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 */
@@ -168,7 +168,7 @@#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_DEBUG)/* 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)/* show link reads/writes with greater verbosity */ +#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 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 debugging */
src/openvpn/fragment.h +49 -60
150 lines not on this page · raw message
src/openvpn/init.c +6 -3
@@ -983,7 +983,8 @@ {if (!options->dev && options->dev_node) { -char *dev_node =string_alloc (options->dev_node,NULL );/* POSIX basename() implementations may modify its arguments */ +/* POSIX basename() implementations may modify its arguments */ +char *dev_node =string_alloc (options->dev_node,NULL ); options->dev =basename (dev_node); } }
@@ -2572,12 +2573,14 @@ }else { -initialization_sequence_completed (c, error_flags);/* client/p2p --route-delay undefined */ +/* client/p2p --route-delay undefined */ +initialization_sequence_completed (c, error_flags); } }else if (c->options.mode ==MODE_POINT_TO_POINT ) { -initialization_sequence_completed (c, error_flags);/* client/p2p restart with --persist-tun */ +/* client/p2p restart with --persist-tun */ +initialization_sequence_completed (c, error_flags); }tls_print_deferred_options_results (c);
src/openvpn/manage.c +6 -3
@@ -3447,7 +3447,8 @@const bool standalone_disabled_save = man->persist.standalone_disabled;time_t expire =0 ; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false;/* set expire time */ update_time ();
@@ -3510,7 +3511,8 @@unsigned int up_query_mode =0 ;const char *sc =NULL ; ret = true; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ;CLEAR (man->connection.up_query);
@@ -3634,7 +3636,8 @@if (man_standalone_ok (man)) { - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ; *state =EKS_SOLICIT ;
src/openvpn/misc.h +7 -5
@@ -114,12 +114,14 @@#define GET_USER_PASS_NEED_STR (1<<5)#define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6) -#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/* CRV1 protocol -- dynamic challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/* SCRV1 protocol -- static challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/* SCRV1 protocol -- echo response */ +#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/**< CRV1 protocol -- dynamic challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/**< SCRV1 protocol -- static challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/**< SCRV1 protocol -- echo response */ -#define GET_USER_PASS_INLINE_CREDS (1<<10)/* indicates that auth_file is actually inline creds */ -#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/* indicates password and response should be concatenated */ +/** indicates that auth_file is actually inline creds */ +#define GET_USER_PASS_INLINE_CREDS (1<<10) +/** indicates password and response should be concatenated */ +#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/** * Retrieves the user credentials from various sources depending on the flags.
src/openvpn/options.c +2 -1
@@ -853,7 +853,8 @@ o->tuntap_options.ip_win32_type =IPW32_SET_DHCP_MASQ ;#endif o->tuntap_options.dhcp_lease_time =31536000 ;/* one year */ - o->tuntap_options.dhcp_masq_offset =0 ;/* use network address as internal DHCP server address */ +/* use network address as internal DHCP server address */ + o->tuntap_options.dhcp_masq_offset =0 ; o->route_method =ROUTE_METHOD_ADAPTIVE ; o->block_outside_dns = false; o->windows_driver =WINDOWS_DRIVER_UNSPECIFIED ;
src/openvpn/ssl_common.h +51 -43
140 lines not on this page · raw message
[Openvpn-devel] [PATCH applied] Re: Manually reformat some long trailing comments
Looked at the changes, all make sense. Ran through a set of client tests, just to make sure no accidents happened that would break things somewhere (no breakage) - also, buildbots already stated "no breakage".
Your patch has been applied to the master branch.
commit eef30e6e72d6bb36c0c0ec29a1219e7d54c866eb
Author: Frank Lichtenheld Date: Mon May 5 12:54:43 2025 +0200
Manually reformat some long trailing comments
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31561.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#17) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/792?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: Manually reformat some long trailing comments
......................................................................
Manually reformat some long trailing comments
When trying to reformat the code with a formatter
that actually checks line-lengths, these never
come out nice otherwise.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31561.html
---
M sample/sample-plugins/simple/base64.c
M src/openvpn/comp.h
M src/openvpn/errlevel.h
M src/openvpn/fragment.h
M src/openvpn/init.c
M src/openvpn/manage.c
M src/openvpn/misc.h
M src/openvpn/options.c
M src/openvpn/ssl_common.h
9 files changed, 152 insertions(+), 134 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/92/792/17
sample/sample-plugins/simple/base64.c +8 -4
@@ -31,10 +31,14 @@#define PLUGIN_NAME "base64.c"/* Exported plug-in v3 API functions */ -plugin_log_t ovpn_log =NULL ;/**< Pointer to the OpenVPN log function. See plugin_log() */ -plugin_vlog_t ovpn_vlog =NULL ;/**< Pointer to the OpenVPN vlog function. See plugin_vlog() */ -plugin_base64_encode_t ovpn_base64_encode =NULL ;/**< Pointer to the openvpn_base64_encode () function */ -plugin_base64_decode_t ovpn_base64_decode =NULL ;/**< Pointer to the openvpn_base64_decode () function */ +/** Pointer to the OpenVPN log function. See plugin_log() */ +plugin_log_t ovpn_log =NULL ; +/** Pointer to the OpenVPN vlog function. See plugin_vlog() */ +plugin_vlog_t ovpn_vlog =NULL ; +/** Pointer to the openvpn_base64_encode () function */ +plugin_base64_encode_t ovpn_base64_encode =NULL ; +/** Pointer to the openvpn_base64_decode () function */ +plugin_base64_decode_t ovpn_base64_decode =NULL ;/** * Search the environment pointer for a specific env var name
src/openvpn/comp.h +20 -12
@@ -36,20 +36,27 @@#define COMP_F_ADAPTIVE (1<<0) / * COMP_ALG_LZO only * / #define COMP_F_ALLOW_COMPRESS (1<<1) / * not only incoming is compressed but also outgoing * / */ -#define COMP_F_SWAP (1<<2)/* initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3)/* tell server that we only support compression stubs */ -#define COMP_F_ALLOW_STUB_ONLY (1<<4)/* Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY -* we still accept other compressions to be pushed */ -#define COMP_F_MIGRATE (1<<5)/* push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_ALLOW_ASYM (1<<6)/* Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* Do not allow compression framing (breaks DCO) */ +/** initial command byte is swapped with last byte in buffer to preserve payload alignment */ +#define COMP_F_SWAP (1<<2) +/** tell server that we only support compression stubs */ +#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3) +/** Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY +* we still accept other compressions to be pushed */ +#define COMP_F_ALLOW_STUB_ONLY (1<<4) +/** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ +#define COMP_F_MIGRATE (1<<5) +/** Compression was explicitly set to allow asymetric compression */ +#define COMP_F_ALLOW_ASYM (1<<6) +/** Do not allow compression framing (breaks DCO) */ +#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* algorithms */ #define COMP_ALG_UNDEF 0 -#define COMP_ALG_STUB 1/* support compression command byte and framing without actual compression */ -#define COMP_ALG_LZO 2/* LZO algorithm */ -#define COMP_ALG_SNAPPY 3/* Snappy algorithm (no longer supported) */ -#define COMP_ALG_LZ4 4/* LZ4 algorithm */ +/** support compression command byte and framing without actual compression */ +#define COMP_ALG_STUB 1 +#define COMP_ALG_LZO 2/**< LZO algorithm */ +#define COMP_ALG_SNAPPY 3/**< Snappy algorithm (no longer supported) */ +#define COMP_ALG_LZ4 4/**< LZ4 algorithm */ /* algorithm v2 */
@@ -106,7 +113,8 @@#define LZO_COMPRESS_BYTE 0x66#define LZ4_COMPRESS_BYTE 0x69#define NO_COMPRESS_BYTE 0xFA -#define NO_COMPRESS_BYTE_SWAP 0xFB/* to maintain payload alignment, replace this byte with last byte of packet */ +/** to maintain payload alignment, replace this byte with last byte of packet */ +#define NO_COMPRESS_BYTE_SWAP 0xFB/* V2 on wire code */ #define COMP_ALGV2_INDICATOR_BYTE 0x50
src/openvpn/errlevel.h +3 -3
@@ -143,7 +143,7 @@#define D_PACKET_TRUNC_DEBUG LOGLEV(7, 70, M_DEBUG)/* PACKET_TRUNCATION_CHECK verbose */ #define D_PING LOGLEV(7, 70, M_DEBUG)/* PING send/receive messages */ #define D_PS_PROXY_DEBUG LOGLEV(7, 70, M_DEBUG)/* port share proxy debug */ -#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show information on key selection for data channel */ +#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show key selection for data channel */ #define D_ARGV_PARSE_CMD LOGLEV(7, 70, M_DEBUG)/* show parse_line() errors in argv_parse_cmd */ #define D_CRYPTO_DEBUG LOGLEV(7, 70, M_DEBUG)/* show detailed info from crypto.c routines */ #define D_PID_DEBUG LOGLEV(7, 70, M_DEBUG)/* show packet-id debugging info */
@@ -153,7 +153,7 @@#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG)/* show VLAN tagging/untagging debug info */ -#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of each handshake */ +#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of handshake */ #define D_TLS_DEBUG_MED LOGLEV(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 */
@@ -168,7 +168,7 @@#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_DEBUG)/* 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)/* show link reads/writes with greater verbosity */ +#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 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 debugging */
src/openvpn/fragment.h +49 -60
150 lines not on this page · raw message
src/openvpn/init.c +6 -3
@@ -983,7 +983,8 @@ {if (!options->dev && options->dev_node) { -char *dev_node =string_alloc (options->dev_node,NULL );/* POSIX basename() implementations may modify its arguments */ +/* POSIX basename() implementations may modify its arguments */ +char *dev_node =string_alloc (options->dev_node,NULL ); options->dev =basename (dev_node); } }
@@ -2572,12 +2573,14 @@ }else { -initialization_sequence_completed (c, error_flags);/* client/p2p --route-delay undefined */ +/* client/p2p --route-delay undefined */ +initialization_sequence_completed (c, error_flags); } }else if (c->options.mode ==MODE_POINT_TO_POINT ) { -initialization_sequence_completed (c, error_flags);/* client/p2p restart with --persist-tun */ +/* client/p2p restart with --persist-tun */ +initialization_sequence_completed (c, error_flags); }tls_print_deferred_options_results (c);
src/openvpn/manage.c +6 -3
@@ -3447,7 +3447,8 @@const bool standalone_disabled_save = man->persist.standalone_disabled;time_t expire =0 ; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false;/* set expire time */ update_time ();
@@ -3510,7 +3511,8 @@unsigned int up_query_mode =0 ;const char *sc =NULL ; ret = true; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ;CLEAR (man->connection.up_query);
@@ -3634,7 +3636,8 @@if (man_standalone_ok (man)) { - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ; *state =EKS_SOLICIT ;
src/openvpn/misc.h +7 -5
@@ -114,12 +114,14 @@#define GET_USER_PASS_NEED_STR (1<<5)#define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6) -#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/* CRV1 protocol -- dynamic challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/* SCRV1 protocol -- static challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/* SCRV1 protocol -- echo response */ +#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/**< CRV1 protocol -- dynamic challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/**< SCRV1 protocol -- static challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/**< SCRV1 protocol -- echo response */ -#define GET_USER_PASS_INLINE_CREDS (1<<10)/* indicates that auth_file is actually inline creds */ -#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/* indicates password and response should be concatenated */ +/** indicates that auth_file is actually inline creds */ +#define GET_USER_PASS_INLINE_CREDS (1<<10) +/** indicates password and response should be concatenated */ +#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/** * Retrieves the user credentials from various sources depending on the flags.
src/openvpn/options.c +2 -1
@@ -853,7 +853,8 @@ o->tuntap_options.ip_win32_type =IPW32_SET_DHCP_MASQ ;#endif o->tuntap_options.dhcp_lease_time =31536000 ;/* one year */ - o->tuntap_options.dhcp_masq_offset =0 ;/* use network address as internal DHCP server address */ +/* use network address as internal DHCP server address */ + o->tuntap_options.dhcp_masq_offset =0 ; o->route_method =ROUTE_METHOD_ADAPTIVE ; o->block_outside_dns = false; o->windows_driver =WINDOWS_DRIVER_UNSPECIFIED ;
src/openvpn/ssl_common.h +51 -43
140 lines not on this page · raw message
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/792?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f0ba2261b61f6eed511cbd8bb2e880d774d1365
Gerrit-Change-Number: 792
Gerrit-PatchSet: 17
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/792?usp=email )
Change subject: Manually reformat some long trailing comments
......................................................................
Manually reformat some long trailing comments
When trying to reformat the code with a formatter
that actually checks line-lengths, these never
come out nice otherwise.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31561.html
---
M sample/sample-plugins/simple/base64.c
M src/openvpn/comp.h
M src/openvpn/errlevel.h
M src/openvpn/fragment.h
M src/openvpn/init.c
M src/openvpn/manage.c
M src/openvpn/misc.h
M src/openvpn/options.c
M src/openvpn/ssl_common.h
9 files changed, 152 insertions(+), 134 deletions(-)
sample/sample-plugins/simple/base64.c +8 -4
@@ -31,10 +31,14 @@#define PLUGIN_NAME "base64.c"/* Exported plug-in v3 API functions */ -plugin_log_t ovpn_log =NULL ;/**< Pointer to the OpenVPN log function. See plugin_log() */ -plugin_vlog_t ovpn_vlog =NULL ;/**< Pointer to the OpenVPN vlog function. See plugin_vlog() */ -plugin_base64_encode_t ovpn_base64_encode =NULL ;/**< Pointer to the openvpn_base64_encode () function */ -plugin_base64_decode_t ovpn_base64_decode =NULL ;/**< Pointer to the openvpn_base64_decode () function */ +/** Pointer to the OpenVPN log function. See plugin_log() */ +plugin_log_t ovpn_log =NULL ; +/** Pointer to the OpenVPN vlog function. See plugin_vlog() */ +plugin_vlog_t ovpn_vlog =NULL ; +/** Pointer to the openvpn_base64_encode () function */ +plugin_base64_encode_t ovpn_base64_encode =NULL ; +/** Pointer to the openvpn_base64_decode () function */ +plugin_base64_decode_t ovpn_base64_decode =NULL ;/** * Search the environment pointer for a specific env var name
src/openvpn/comp.h +20 -12
@@ -36,20 +36,27 @@#define COMP_F_ADAPTIVE (1<<0) / * COMP_ALG_LZO only * / #define COMP_F_ALLOW_COMPRESS (1<<1) / * not only incoming is compressed but also outgoing * / */ -#define COMP_F_SWAP (1<<2)/* initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3)/* tell server that we only support compression stubs */ -#define COMP_F_ALLOW_STUB_ONLY (1<<4)/* Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY -* we still accept other compressions to be pushed */ -#define COMP_F_MIGRATE (1<<5)/* push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_ALLOW_ASYM (1<<6)/* Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* Do not allow compression framing (breaks DCO) */ +/** initial command byte is swapped with last byte in buffer to preserve payload alignment */ +#define COMP_F_SWAP (1<<2) +/** tell server that we only support compression stubs */ +#define COMP_F_ADVERTISE_STUBS_ONLY (1<<3) +/** Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY +* we still accept other compressions to be pushed */ +#define COMP_F_ALLOW_STUB_ONLY (1<<4) +/** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ +#define COMP_F_MIGRATE (1<<5) +/** Compression was explicitly set to allow asymetric compression */ +#define COMP_F_ALLOW_ASYM (1<<6) +/** Do not allow compression framing (breaks DCO) */ +#define COMP_F_ALLOW_NOCOMP_ONLY (1<<7)/* algorithms */ #define COMP_ALG_UNDEF 0 -#define COMP_ALG_STUB 1/* support compression command byte and framing without actual compression */ -#define COMP_ALG_LZO 2/* LZO algorithm */ -#define COMP_ALG_SNAPPY 3/* Snappy algorithm (no longer supported) */ -#define COMP_ALG_LZ4 4/* LZ4 algorithm */ +/** support compression command byte and framing without actual compression */ +#define COMP_ALG_STUB 1 +#define COMP_ALG_LZO 2/**< LZO algorithm */ +#define COMP_ALG_SNAPPY 3/**< Snappy algorithm (no longer supported) */ +#define COMP_ALG_LZ4 4/**< LZ4 algorithm */ /* algorithm v2 */
@@ -106,7 +113,8 @@#define LZO_COMPRESS_BYTE 0x66#define LZ4_COMPRESS_BYTE 0x69#define NO_COMPRESS_BYTE 0xFA -#define NO_COMPRESS_BYTE_SWAP 0xFB/* to maintain payload alignment, replace this byte with last byte of packet */ +/** to maintain payload alignment, replace this byte with last byte of packet */ +#define NO_COMPRESS_BYTE_SWAP 0xFB/* V2 on wire code */ #define COMP_ALGV2_INDICATOR_BYTE 0x50
src/openvpn/errlevel.h +3 -3
@@ -143,7 +143,7 @@#define D_PACKET_TRUNC_DEBUG LOGLEV(7, 70, M_DEBUG)/* PACKET_TRUNCATION_CHECK verbose */ #define D_PING LOGLEV(7, 70, M_DEBUG)/* PING send/receive messages */ #define D_PS_PROXY_DEBUG LOGLEV(7, 70, M_DEBUG)/* port share proxy debug */ -#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show information on key selection for data channel */ +#define D_TLS_KEYSELECT LOGLEV(7, 70, M_DEBUG)/* show key selection for data channel */ #define D_ARGV_PARSE_CMD LOGLEV(7, 70, M_DEBUG)/* show parse_line() errors in argv_parse_cmd */ #define D_CRYPTO_DEBUG LOGLEV(7, 70, M_DEBUG)/* show detailed info from crypto.c routines */ #define D_PID_DEBUG LOGLEV(7, 70, M_DEBUG)/* show packet-id debugging info */
@@ -153,7 +153,7 @@#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG)/* show VLAN tagging/untagging debug info */ -#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of each handshake */ +#define D_HANDSHAKE_VERBOSE LOGLEV(8, 70, M_DEBUG)/* show detailed description of handshake */ #define D_TLS_DEBUG_MED LOGLEV(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 */
@@ -168,7 +168,7 @@#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_DEBUG)/* 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)/* show link reads/writes with greater verbosity */ +#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 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 debugging */
src/openvpn/fragment.h +49 -60
150 lines not on this page · raw message
src/openvpn/init.c +6 -3
@@ -983,7 +983,8 @@ {if (!options->dev && options->dev_node) { -char *dev_node =string_alloc (options->dev_node,NULL );/* POSIX basename() implementations may modify its arguments */ +/* POSIX basename() implementations may modify its arguments */ +char *dev_node =string_alloc (options->dev_node,NULL ); options->dev =basename (dev_node); } }
@@ -2572,12 +2573,14 @@ }else { -initialization_sequence_completed (c, error_flags);/* client/p2p --route-delay undefined */ +/* client/p2p --route-delay undefined */ +initialization_sequence_completed (c, error_flags); } }else if (c->options.mode ==MODE_POINT_TO_POINT ) { -initialization_sequence_completed (c, error_flags);/* client/p2p restart with --persist-tun */ +/* client/p2p restart with --persist-tun */ +initialization_sequence_completed (c, error_flags); }tls_print_deferred_options_results (c);
src/openvpn/manage.c +6 -3
@@ -3447,7 +3447,8 @@const bool standalone_disabled_save = man->persist.standalone_disabled;time_t expire =0 ; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false;/* set expire time */ update_time ();
@@ -3510,7 +3511,8 @@unsigned int up_query_mode =0 ;const char *sc =NULL ; ret = true; - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ;CLEAR (man->connection.up_query);
@@ -3634,7 +3636,8 @@if (man_standalone_ok (man)) { - man->persist.standalone_disabled = false;/* This is so M_CLIENT messages will be correctly passed through msg() */ +/* This is so M_CLIENT messages will be correctly passed through msg() */ + man->persist.standalone_disabled = false; man->persist.special_state_msg =NULL ; *state =EKS_SOLICIT ;
src/openvpn/misc.h +7 -5
@@ -114,12 +114,14 @@#define GET_USER_PASS_NEED_STR (1<<5)#define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6) -#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/* CRV1 protocol -- dynamic challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/* SCRV1 protocol -- static challenge */ -#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/* SCRV1 protocol -- echo response */ +#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)/**< CRV1 protocol -- dynamic challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE (1<<8)/**< SCRV1 protocol -- static challenge */ +#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)/**< SCRV1 protocol -- echo response */ -#define GET_USER_PASS_INLINE_CREDS (1<<10)/* indicates that auth_file is actually inline creds */ -#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/* indicates password and response should be concatenated */ +/** indicates that auth_file is actually inline creds */ +#define GET_USER_PASS_INLINE_CREDS (1<<10) +/** indicates password and response should be concatenated */ +#define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)/** * Retrieves the user credentials from various sources depending on the flags.
src/openvpn/options.c +2 -1
@@ -853,7 +853,8 @@ o->tuntap_options.ip_win32_type =IPW32_SET_DHCP_MASQ ;#endif o->tuntap_options.dhcp_lease_time =31536000 ;/* one year */ - o->tuntap_options.dhcp_masq_offset =0 ;/* use network address as internal DHCP server address */ +/* use network address as internal DHCP server address */ + o->tuntap_options.dhcp_masq_offset =0 ; o->route_method =ROUTE_METHOD_ADAPTIVE ; o->block_outside_dns = false; o->windows_driver =WINDOWS_DRIVER_UNSPECIFIED ;
src/openvpn/ssl_common.h +51 -43
140 lines not on this page · raw message
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/792?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f0ba2261b61f6eed511cbd8bb2e880d774d1365
Gerrit-Change-Number: 792
Gerrit-PatchSet: 17
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged