You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(24) |
May
(14) |
Jun
(29) |
Jul
(33) |
Aug
(3) |
Sep
(8) |
Oct
(18) |
Nov
(1) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
(33) |
Mar
(7) |
Apr
(28) |
May
(30) |
Jun
(5) |
Jul
(10) |
Aug
(7) |
Sep
(32) |
Oct
(41) |
Nov
(20) |
Dec
(10) |
2004 |
Jan
(24) |
Feb
(18) |
Mar
(57) |
Apr
(40) |
May
(55) |
Jun
(48) |
Jul
(77) |
Aug
(15) |
Sep
(56) |
Oct
(80) |
Nov
(74) |
Dec
(52) |
2005 |
Jan
(38) |
Feb
(42) |
Mar
(39) |
Apr
(56) |
May
(79) |
Jun
(73) |
Jul
(16) |
Aug
(23) |
Sep
(68) |
Oct
(77) |
Nov
(52) |
Dec
(27) |
2006 |
Jan
(27) |
Feb
(18) |
Mar
(51) |
Apr
(62) |
May
(28) |
Jun
(50) |
Jul
(36) |
Aug
(33) |
Sep
(47) |
Oct
(50) |
Nov
(77) |
Dec
(13) |
2007 |
Jan
(15) |
Feb
(8) |
Mar
(14) |
Apr
(18) |
May
(25) |
Jun
(16) |
Jul
(16) |
Aug
(19) |
Sep
(32) |
Oct
(17) |
Nov
(5) |
Dec
(5) |
2008 |
Jan
(64) |
Feb
(25) |
Mar
(25) |
Apr
(6) |
May
(28) |
Jun
(20) |
Jul
(10) |
Aug
(27) |
Sep
(28) |
Oct
(59) |
Nov
(37) |
Dec
(43) |
2009 |
Jan
(40) |
Feb
(25) |
Mar
(12) |
Apr
(57) |
May
(46) |
Jun
(29) |
Jul
(39) |
Aug
(10) |
Sep
(20) |
Oct
(42) |
Nov
(50) |
Dec
(57) |
2010 |
Jan
(82) |
Feb
(165) |
Mar
(256) |
Apr
(260) |
May
(36) |
Jun
(87) |
Jul
(53) |
Aug
(89) |
Sep
(107) |
Oct
(51) |
Nov
(88) |
Dec
(117) |
2011 |
Jan
(69) |
Feb
(60) |
Mar
(113) |
Apr
(71) |
May
(67) |
Jun
(90) |
Jul
(88) |
Aug
(90) |
Sep
(48) |
Oct
(64) |
Nov
(69) |
Dec
(118) |
2012 |
Jan
(49) |
Feb
(528) |
Mar
(351) |
Apr
(190) |
May
(238) |
Jun
(193) |
Jul
(104) |
Aug
(100) |
Sep
(57) |
Oct
(41) |
Nov
(47) |
Dec
(51) |
2013 |
Jan
(94) |
Feb
(57) |
Mar
(96) |
Apr
(105) |
May
(77) |
Jun
(102) |
Jul
(27) |
Aug
(81) |
Sep
(32) |
Oct
(53) |
Nov
(127) |
Dec
(65) |
2014 |
Jan
(113) |
Feb
(59) |
Mar
(104) |
Apr
(259) |
May
(70) |
Jun
(70) |
Jul
(146) |
Aug
(45) |
Sep
(58) |
Oct
(149) |
Nov
(77) |
Dec
(83) |
2015 |
Jan
(53) |
Feb
(66) |
Mar
(86) |
Apr
(50) |
May
(135) |
Jun
(76) |
Jul
(151) |
Aug
(83) |
Sep
(97) |
Oct
(262) |
Nov
(245) |
Dec
(231) |
2016 |
Jan
(131) |
Feb
(233) |
Mar
(97) |
Apr
(138) |
May
(221) |
Jun
(254) |
Jul
(92) |
Aug
(248) |
Sep
(168) |
Oct
(275) |
Nov
(477) |
Dec
(445) |
2017 |
Jan
(218) |
Feb
(217) |
Mar
(146) |
Apr
(172) |
May
(216) |
Jun
(252) |
Jul
(164) |
Aug
(192) |
Sep
(190) |
Oct
(143) |
Nov
(255) |
Dec
(182) |
2018 |
Jan
(295) |
Feb
(164) |
Mar
(113) |
Apr
(147) |
May
(64) |
Jun
(262) |
Jul
(184) |
Aug
(90) |
Sep
(69) |
Oct
(364) |
Nov
(102) |
Dec
(101) |
2019 |
Jan
(119) |
Feb
(64) |
Mar
(64) |
Apr
(102) |
May
(57) |
Jun
(154) |
Jul
(84) |
Aug
(81) |
Sep
(76) |
Oct
(102) |
Nov
(233) |
Dec
(89) |
2020 |
Jan
(38) |
Feb
(170) |
Mar
(155) |
Apr
(172) |
May
(120) |
Jun
(223) |
Jul
(461) |
Aug
(227) |
Sep
(268) |
Oct
(113) |
Nov
(56) |
Dec
(124) |
2021 |
Jan
(121) |
Feb
(48) |
Mar
(334) |
Apr
(345) |
May
(207) |
Jun
(136) |
Jul
(71) |
Aug
(112) |
Sep
(122) |
Oct
(173) |
Nov
(184) |
Dec
(223) |
2022 |
Jan
(197) |
Feb
(206) |
Mar
(156) |
Apr
(212) |
May
(192) |
Jun
(170) |
Jul
(143) |
Aug
(380) |
Sep
(182) |
Oct
(148) |
Nov
(128) |
Dec
(269) |
2023 |
Jan
(248) |
Feb
(196) |
Mar
(264) |
Apr
(36) |
May
(123) |
Jun
(66) |
Jul
(120) |
Aug
(48) |
Sep
(157) |
Oct
(198) |
Nov
(300) |
Dec
(273) |
2024 |
Jan
(271) |
Feb
(147) |
Mar
(207) |
Apr
(78) |
May
(107) |
Jun
(168) |
Jul
(151) |
Aug
(51) |
Sep
(438) |
Oct
(221) |
Nov
(302) |
Dec
(357) |
2025 |
Jan
(451) |
Feb
(219) |
Mar
(326) |
Apr
(232) |
May
(306) |
Jun
(181) |
Jul
(452) |
Aug
(161) |
Sep
|
Oct
|
Nov
|
Dec
|
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 17:11:16
|
cron2 has uploaded a new patch set (#17) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/830?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Remove uncrustify config and reformat-all.sh ...................................................................... Remove uncrustify config and reformat-all.sh Replaced with clang-format. Change-Id: I15d4946800cbfaead67a73450ff3b12193814e54 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32543.html Signed-off-by: Gert Doering <ge...@gr...> --- D dev-tools/reformat-all.sh D dev-tools/special-files.lst D dev-tools/uncrustify.conf 3 files changed, 0 insertions(+), 219 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/830/17 diff --git a/dev-tools/reformat-all.sh b/dev-tools/reformat-all.sh deleted file mode 100755 index 0a31a83..0000000 --- a/dev-tools/reformat-all.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -# reformat-all.sh - Reformat all git files in the checked out -# git branch using uncrustify. -# -# Copyright (C) 2016-2025 - David Sommerseth <da...@op...> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <https://www.gnu.org/licenses/>. -# - -tstamp="$(date +%Y%m%d-%H%M%S)" -files="$(pwd)/reformat-all_files-$tstamp.lst" -log="$(pwd)/reformat-all_log-$tstamp.txt" - -srcroot="$(git rev-parse --show-toplevel)" -cfg="$srcroot/dev-tools/uncrustify.conf" -specialfiles="$srcroot/dev-tools/special-files.lst" - -export gitfiles=0 -export procfiles=0 - -# Go to the root of the source tree -cd "$srcroot" - -{ - echo -n "** Starting $0: " - date - - # Find all C source/header files - git ls-files | grep -E ".*\.[ch](\.in$|$)" > "${files}.git" - - # Manage files which needs special treatment - awk -F\# '{gsub("\n| ", "", $1); print $1}' "$specialfiles" > "${files}.sp" - while read srcfile - do - res=$(grep "$srcfile" "${files}.sp" 2>/dev/null) - if [ $? -ne 0 ]; then - # If grep didn't find the file among special files, - # process it normally - echo "$srcfile" >> "$files" - else - mode=$(echo "$res" | cut -d: -f1) - case "$mode" in - E) - echo "** INFO ** Excluding '$srcfile'" - ;; - P) - echo "** INFO ** Pre-patching '$srcfile'" - patchfile="${srcroot}"/dev-tools/reformat-patches/before_$(echo "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** ERROR ** Failed to apply pre-patch file: $patchfile" - exit 2 - fi - else - echo "** WARN ** Pre-patch file for $srcfile is missing: $patchfile" - fi - echo "$srcfile" >> "${files}.postpatch" - echo "$srcfile" >> "$files" - ;; - *) - echo "** WARN ** Unknown mode '$mode' for file '$srcfile'" - ;; - esac - fi - done < "${files}.git" - rm -f "${files}.git" "${files}.sp" - - # Kick off uncrustify - echo - echo "** INFO ** Running: uncrustify -c $cfg --no-backup -l C -F $files" - uncrustify -c "$cfg" --no-backup -l C -F "$files" 2>&1 - res=$? - echo "** INFO ** Uncrustify completed (exit code $res)" -} | tee "${log}-1" # Log needs to be closed here, to be processed in next block - -{ - # Check the results - gitfiles=$(wc -l "$files" | cut -d\ -f1) - procfiles=$(grep "Parsing: " "${log}-1" | wc -l) - echo - echo "C source/header files checked into git: $gitfiles" - echo "Files processed by uncrustify: $procfiles" - echo - - # Post-Patch files modified after we uncrustify have adjusted them - if [ -r "${files}.postpatch" ]; then - while read srcfile; - do - patchfile="${srcroot}"/dev-tools/reformat-patches/after_$(echo "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - echo "** INFO ** Post-patching '$srcfile'" - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** WARN ** Failed to apply $patchfile" - fi - else - echo "** WARN ** Post-patch file for $srcfile is missing: $patchfile" - fi - done < "${files}.postpatch" - rm -f "${files}.postpatch" - fi -} | tee "${log}-2" # Log needs to be closed here, to be processed in next block - -cat "${log}-1" "${log}-2" > "$log" - -{ - ec=1 - echo - if [ "$gitfiles" -eq "$procfiles" ]; then - echo "Reformatting completed successfully" - ec=0 - else - last=$(tail -n1 "${log}-1") - echo "** ERROR ** Reformating failed to process all files." - echo " uncrustify exit code: $res" - echo " Last log line: $last" - echo - fi - rm -f "${log}-1" "${log}-2" -} | tee -a "$log" -rm -f "${files}" - -exit $ec diff --git a/dev-tools/special-files.lst b/dev-tools/special-files.lst deleted file mode 100644 index e5f2fc2..0000000 --- a/dev-tools/special-files.lst +++ /dev/null @@ -1,5 +0,0 @@ -E:doc/doxygen/doc_key_generation.h # @verbatim section gets mistreated, exclude it -E:src/compat/compat-lz4.c # Preserve LZ4 upstream formatting -E:src/compat/compat-lz4.h # Preserve LZ4 upstream formatting -E:src/openvpn/ovpn_dco_linux.h # Preserve ovpn-dco upstream formatting -E:src/openvpn/ovpn_dco_win.h # Preserve ovpn-dco-win upstream formatting diff --git a/dev-tools/uncrustify.conf b/dev-tools/uncrustify.conf deleted file mode 100644 index 325f310..0000000 --- a/dev-tools/uncrustify.conf +++ /dev/null @@ -1,79 +0,0 @@ -# Use Allman-style -indent_columns=4 -indent_braces=false -indent_else_if=false -indent_switch_case=4 -indent_label=1 -nl_if_brace=add -nl_brace_else=add -nl_elseif_brace=add -nl_else_brace=add -nl_else_if=remove -nl_for_brace=add -nl_while_brace=add -nl_switch_brace=add -nl_fdef_brace=add -nl_do_brace=add -sp_func_proto_paren=Remove -sp_func_def_paren=Remove -sp_func_call_paren=Remove -sp_sizeof_paren=Remove - -# No tabs, spaces only -indent_with_tabs=0 -align_with_tabs=false -cmt_convert_tab_to_spaces=true - -# Do not put spaces between the # and preprocessor statements -pp_space=remove - -# Various whitespace fiddling -sp_assign=add -sp_before_sparen=add -sp_inside_sparen=remove -sp_cond_colon=add -sp_cond_question=add -sp_bool=add -sp_else_brace=add -sp_brace_else=add -sp_after_comma=add -pos_arith=Lead -pos_bool=Lead -nl_func_type_name=add -nl_before_case=true -nl_assign_leave_one_liners=true -nl_enum_leave_one_liners=true -nl_brace_fparen=add -nl_max=4 -nl_after_func_proto=2 -nl_end_of_file_min=1 -nl_end_of_file=force - -# Always use scoping braces for conditionals -mod_full_brace_if=add -mod_full_brace_if_chain=false -mod_full_brace_while=add -mod_full_brace_for=add -mod_full_brace_do=add - -# Annotate #else and #endif statements -mod_add_long_ifdef_endif_comment=20 -mod_add_long_ifdef_else_comment=5 - -# Misc cleanup -mod_remove_extra_semicolon=true - -# leave blank at end of empty for() statements -sp_after_semi_for_empty=Add - -# Use C-style comments (/* .. */) -cmt_c_nl_end=true -cmt_star_cont=true -cmt_cpp_to_c=true - -# Use "char **a"-style pointer stars/dereferences -sp_before_ptr_star=Add -sp_between_ptr_star=Remove -sp_after_ptr_star=Remove -sp_before_byref=Add -sp_after_byref=Remove -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/830?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: I15d4946800cbfaead67a73450ff3b12193814e54 Gerrit-Change-Number: 830 Gerrit-PatchSet: 17 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: newpatchset |
From: Gert D. <ge...@gr...> - 2025-08-05 17:11:05
|
I discussed a while (mostly with myself) whether we want to keep this, as it is a useful tool "for the next great reformatting, at least" - but it's way too complicated for what we need to day (like, pre-patching files to work around uncrustify bugs is what we didn't do in a long time). For the record, the source tree can be reformatted just fine with this: clang-format --verbose -i \ `find . -name "*.[ch]" -print | egrep -v 'ovpn_dco_(linux|win)\.h'` Your patch has been applied to the master branch. commit 75f9bd37ae94ad2e126f68276cee52fc8af3079f Author: Frank Lichtenheld Date: Tue Aug 5 18:59:00 2025 +0200 Remove uncrustify config and reformat-all.sh Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32543.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: Gert D. <ge...@gr...> - 2025-08-05 16:59:20
|
From: Frank Lichtenheld <fr...@li...> Replaced with clang-format. Change-Id: I15d4946800cbfaead67a73450ff3b12193814e54 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> --- 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/+/830 This mail reflects revision 16 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <ge...@gr...> diff --git a/dev-tools/reformat-all.sh b/dev-tools/reformat-all.sh deleted file mode 100755 index 0a31a83..0000000 --- a/dev-tools/reformat-all.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -# reformat-all.sh - Reformat all git files in the checked out -# git branch using uncrustify. -# -# Copyright (C) 2016-2025 - David Sommerseth <da...@op...> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <https://www.gnu.org/licenses/>. -# - -tstamp="$(date +%Y%m%d-%H%M%S)" -files="$(pwd)/reformat-all_files-$tstamp.lst" -log="$(pwd)/reformat-all_log-$tstamp.txt" - -srcroot="$(git rev-parse --show-toplevel)" -cfg="$srcroot/dev-tools/uncrustify.conf" -specialfiles="$srcroot/dev-tools/special-files.lst" - -export gitfiles=0 -export procfiles=0 - -# Go to the root of the source tree -cd "$srcroot" - -{ - echo -n "** Starting $0: " - date - - # Find all C source/header files - git ls-files | grep -E ".*\.[ch](\.in$|$)" > "${files}.git" - - # Manage files which needs special treatment - awk -F\# '{gsub("\n| ", "", $1); print $1}' "$specialfiles" > "${files}.sp" - while read srcfile - do - res=$(grep "$srcfile" "${files}.sp" 2>/dev/null) - if [ $? -ne 0 ]; then - # If grep didn't find the file among special files, - # process it normally - echo "$srcfile" >> "$files" - else - mode=$(echo "$res" | cut -d: -f1) - case "$mode" in - E) - echo "** INFO ** Excluding '$srcfile'" - ;; - P) - echo "** INFO ** Pre-patching '$srcfile'" - patchfile="${srcroot}"/dev-tools/reformat-patches/before_$(echo "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** ERROR ** Failed to apply pre-patch file: $patchfile" - exit 2 - fi - else - echo "** WARN ** Pre-patch file for $srcfile is missing: $patchfile" - fi - echo "$srcfile" >> "${files}.postpatch" - echo "$srcfile" >> "$files" - ;; - *) - echo "** WARN ** Unknown mode '$mode' for file '$srcfile'" - ;; - esac - fi - done < "${files}.git" - rm -f "${files}.git" "${files}.sp" - - # Kick off uncrustify - echo - echo "** INFO ** Running: uncrustify -c $cfg --no-backup -l C -F $files" - uncrustify -c "$cfg" --no-backup -l C -F "$files" 2>&1 - res=$? - echo "** INFO ** Uncrustify completed (exit code $res)" -} | tee "${log}-1" # Log needs to be closed here, to be processed in next block - -{ - # Check the results - gitfiles=$(wc -l "$files" | cut -d\ -f1) - procfiles=$(grep "Parsing: " "${log}-1" | wc -l) - echo - echo "C source/header files checked into git: $gitfiles" - echo "Files processed by uncrustify: $procfiles" - echo - - # Post-Patch files modified after we uncrustify have adjusted them - if [ -r "${files}.postpatch" ]; then - while read srcfile; - do - patchfile="${srcroot}"/dev-tools/reformat-patches/after_$(echo "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - echo "** INFO ** Post-patching '$srcfile'" - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** WARN ** Failed to apply $patchfile" - fi - else - echo "** WARN ** Post-patch file for $srcfile is missing: $patchfile" - fi - done < "${files}.postpatch" - rm -f "${files}.postpatch" - fi -} | tee "${log}-2" # Log needs to be closed here, to be processed in next block - -cat "${log}-1" "${log}-2" > "$log" - -{ - ec=1 - echo - if [ "$gitfiles" -eq "$procfiles" ]; then - echo "Reformatting completed successfully" - ec=0 - else - last=$(tail -n1 "${log}-1") - echo "** ERROR ** Reformating failed to process all files." - echo " uncrustify exit code: $res" - echo " Last log line: $last" - echo - fi - rm -f "${log}-1" "${log}-2" -} | tee -a "$log" -rm -f "${files}" - -exit $ec diff --git a/dev-tools/special-files.lst b/dev-tools/special-files.lst deleted file mode 100644 index e5f2fc2..0000000 --- a/dev-tools/special-files.lst +++ /dev/null @@ -1,5 +0,0 @@ -E:doc/doxygen/doc_key_generation.h # @verbatim section gets mistreated, exclude it -E:src/compat/compat-lz4.c # Preserve LZ4 upstream formatting -E:src/compat/compat-lz4.h # Preserve LZ4 upstream formatting -E:src/openvpn/ovpn_dco_linux.h # Preserve ovpn-dco upstream formatting -E:src/openvpn/ovpn_dco_win.h # Preserve ovpn-dco-win upstream formatting diff --git a/dev-tools/uncrustify.conf b/dev-tools/uncrustify.conf deleted file mode 100644 index 325f310..0000000 --- a/dev-tools/uncrustify.conf +++ /dev/null @@ -1,79 +0,0 @@ -# Use Allman-style -indent_columns=4 -indent_braces=false -indent_else_if=false -indent_switch_case=4 -indent_label=1 -nl_if_brace=add -nl_brace_else=add -nl_elseif_brace=add -nl_else_brace=add -nl_else_if=remove -nl_for_brace=add -nl_while_brace=add -nl_switch_brace=add -nl_fdef_brace=add -nl_do_brace=add -sp_func_proto_paren=Remove -sp_func_def_paren=Remove -sp_func_call_paren=Remove -sp_sizeof_paren=Remove - -# No tabs, spaces only -indent_with_tabs=0 -align_with_tabs=false -cmt_convert_tab_to_spaces=true - -# Do not put spaces between the # and preprocessor statements -pp_space=remove - -# Various whitespace fiddling -sp_assign=add -sp_before_sparen=add -sp_inside_sparen=remove -sp_cond_colon=add -sp_cond_question=add -sp_bool=add -sp_else_brace=add -sp_brace_else=add -sp_after_comma=add -pos_arith=Lead -pos_bool=Lead -nl_func_type_name=add -nl_before_case=true -nl_assign_leave_one_liners=true -nl_enum_leave_one_liners=true -nl_brace_fparen=add -nl_max=4 -nl_after_func_proto=2 -nl_end_of_file_min=1 -nl_end_of_file=force - -# Always use scoping braces for conditionals -mod_full_brace_if=add -mod_full_brace_if_chain=false -mod_full_brace_while=add -mod_full_brace_for=add -mod_full_brace_do=add - -# Annotate #else and #endif statements -mod_add_long_ifdef_endif_comment=20 -mod_add_long_ifdef_else_comment=5 - -# Misc cleanup -mod_remove_extra_semicolon=true - -# leave blank at end of empty for() statements -sp_after_semi_for_empty=Add - -# Use C-style comments (/* .. */) -cmt_c_nl_end=true -cmt_star_cont=true -cmt_cpp_to_c=true - -# Use "char **a"-style pointer stars/dereferences -sp_before_ptr_star=Add -sp_between_ptr_star=Remove -sp_after_ptr_star=Remove -sp_before_byref=Add -sp_after_byref=Remove |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 16:59:11
|
Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/830?usp=email ) Change subject: Remove uncrustify config and reformat-all.sh ...................................................................... Patch Set 16: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/830?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: I15d4946800cbfaead67a73450ff3b12193814e54 Gerrit-Change-Number: 830 Gerrit-PatchSet: 16 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Tue, 05 Aug 2025 16:58:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:02:40
|
Attention is currently required from: plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1104?usp=email ) Change subject: ssl_common: Make sure ssl flags are treated as unsigned ...................................................................... Set Ready For Review -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1104?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: I03e5ece7580ca4ebd41a7928ead544df46e8bad1 Gerrit-Change-Number: 1104 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Comment-Date: Tue, 05 Aug 2025 16:02:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:47
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1109?usp=email to look at the new patch set (#4). Change subject: route: Make sure various route flags are treated as unsigned ...................................................................... route: Make sure various route flags are treated as unsigned The variables that hold them are already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/route.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/09/1109/4 diff --git a/src/openvpn/route.h b/src/openvpn/route.h index ea8b767..9b6a47e 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -83,14 +83,14 @@ }; /* redirect-gateway flags */ -#define RG_ENABLE (1 << 0) -#define RG_LOCAL (1 << 1) -#define RG_DEF1 (1 << 2) -#define RG_BYPASS_DHCP (1 << 3) -#define RG_BYPASS_DNS (1 << 4) -#define RG_REROUTE_GW (1 << 5) -#define RG_AUTO_LOCAL (1 << 6) -#define RG_BLOCK_LOCAL (1 << 7) +#define RG_ENABLE (1u << 0) +#define RG_LOCAL (1u << 1) +#define RG_DEF1 (1u << 2) +#define RG_BYPASS_DHCP (1u << 3) +#define RG_BYPASS_DNS (1u << 4) +#define RG_REROUTE_GW (1u << 5) +#define RG_AUTO_LOCAL (1u << 6) +#define RG_BLOCK_LOCAL (1u << 7) struct route_option_list { @@ -117,9 +117,9 @@ struct route_ipv4 { -#define RT_DEFINED (1 << 0) -#define RT_ADDED (1 << 1) -#define RT_METRIC_DEFINED (1 << 2) +#define RT_DEFINED (1u << 0) +#define RT_ADDED (1u << 1) +#define RT_METRIC_DEFINED (1u << 2) struct route_ipv4 *next; unsigned int flags; const struct route_option *option; @@ -227,9 +227,9 @@ struct route_list { -#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1 << 0) -#define RL_DID_LOCAL (1 << 1) -#define RL_ROUTES_ADDED (1 << 2) +#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1u << 0) +#define RL_DID_LOCAL (1u << 1) +#define RL_ROUTES_ADDED (1u << 2) unsigned int iflags; struct route_special_addr spec; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1109?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: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Gerrit-Change-Number: 1109 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:46
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1119?usp=email to look at the new patch set (#2). Change subject: list: Make types of hash elements consistent ...................................................................... list: Make types of hash elements consistent Really no use in having the indices and limits in int. Change-Id: I3334465738fb1fbf508dfd719b6a238b500cc0ae Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/integer.h M src/openvpn/list.c M src/openvpn/list.h M src/openvpn/multi.c M src/openvpn/multi.h M src/openvpn/options.c M src/openvpn/options.h M tests/unit_tests/openvpn/test_misc.c 8 files changed, 62 insertions(+), 49 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/19/1119/2 diff --git a/src/openvpn/integer.h b/src/openvpn/integer.h index b82379e..2a6f14a 100644 --- a/src/openvpn/integer.h +++ b/src/openvpn/integer.h @@ -135,6 +135,27 @@ } } +static inline unsigned int +constrain_uint(unsigned int x, unsigned int min, unsigned int max) +{ + if (min > max) + { + return min; + } + if (x < min) + { + return min; + } + else if (x > max) + { + return max; + } + else + { + return x; + } +} + /* * Functions used for circular buffer index arithmetic. */ diff --git a/src/openvpn/list.c b/src/openvpn/list.c index f30d540..1b90d82 100644 --- a/src/openvpn/list.c +++ b/src/openvpn/list.c @@ -34,22 +34,21 @@ #include "memdbg.h" struct hash * -hash_init(const int n_buckets, const uint32_t iv, +hash_init(const uint32_t n_buckets, const uint32_t iv, uint32_t (*hash_function)(const void *key, uint32_t iv), bool (*compare_function)(const void *key1, const void *key2)) { struct hash *h; - int i; ASSERT(n_buckets > 0); ALLOC_OBJ_CLEAR(h, struct hash); - h->n_buckets = (int)adjust_power_of_2(n_buckets); + h->n_buckets = (uint32_t)adjust_power_of_2(n_buckets); h->mask = h->n_buckets - 1; h->hash_function = hash_function; h->compare_function = compare_function; h->iv = iv; ALLOC_ARRAY(h->buckets, struct hash_bucket, h->n_buckets); - for (i = 0; i < h->n_buckets; ++i) + for (uint32_t i = 0; i < h->n_buckets; ++i) { struct hash_bucket *b = &h->buckets[i]; b->list = NULL; @@ -60,8 +59,7 @@ void hash_free(struct hash *hash) { - int i; - for (i = 0; i < hash->n_buckets; ++i) + for (uint32_t i = 0; i < hash->n_buckets; ++i) { struct hash_bucket *b = &hash->buckets[i]; struct hash_element *he = b->list; @@ -212,15 +210,15 @@ } void -hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, int start_bucket, - int end_bucket) +hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, uint32_t start_bucket, + uint32_t end_bucket) { if (end_bucket > hash->n_buckets) { end_bucket = hash->n_buckets; } - ASSERT(start_bucket >= 0 && start_bucket <= end_bucket); + ASSERT(start_bucket <= end_bucket); hi->hash = hash; hi->elem = NULL; @@ -325,6 +323,9 @@ * the return value. Every 1-bit and 2-bit delta achieves avalanche. * About 36+6len instructions. * + * #define hashsize(n) ((uint32_t)1<<(n)) + * #define hashmask(n) (hashsize(n)-1) + * * The best hash table sizes are powers of 2. There is no need to do * mod a prime (mod is sooo slow!). If you need less than 32 bits, * use a bitmask. For example, if you need only 10 bits, do diff --git a/src/openvpn/list.h b/src/openvpn/list.h index fb3302d..5702b95 100644 --- a/src/openvpn/list.h +++ b/src/openvpn/list.h @@ -36,14 +36,11 @@ #include "basic.h" #include "buffer.h" -#define hashsize(n) ((uint32_t)1 << (n)) -#define hashmask(n) (hashsize(n) - 1) - struct hash_element { void *value; const void *key; - unsigned int hash_value; + uint32_t hash_value; struct hash_element *next; }; @@ -54,16 +51,16 @@ struct hash { - int n_buckets; - int n_elements; - int mask; + uint32_t n_buckets; + uint32_t n_elements; + uint32_t mask; uint32_t iv; uint32_t (*hash_function)(const void *key, uint32_t iv); bool (*compare_function)(const void *key1, const void *key2); /* return true if equal */ struct hash_bucket *buckets; }; -struct hash *hash_init(const int n_buckets, const uint32_t iv, +struct hash *hash_init(const uint32_t n_buckets, const uint32_t iv, uint32_t (*hash_function)(const void *key, uint32_t iv), bool (*compare_function)(const void *key1, const void *key2)); @@ -81,17 +78,17 @@ struct hash_iterator { struct hash *hash; - int bucket_index; + uint32_t bucket_index; struct hash_bucket *bucket; struct hash_element *elem; struct hash_element *last; bool bucket_marked; - int bucket_index_start; - int bucket_index_end; + uint32_t bucket_index_start; + uint32_t bucket_index_end; }; -void hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, int start_bucket, - int end_bucket); +void hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, uint32_t start_bucket, + uint32_t end_bucket); void hash_iterator_init(struct hash *hash, struct hash_iterator *iter); @@ -109,13 +106,13 @@ return (*hash->hash_function)(key, hash->iv); } -static inline int +static inline uint32_t hash_n_elements(const struct hash *hash) { return hash->n_elements; } -static inline int +static inline uint32_t hash_n_buckets(const struct hash *hash) { return hash->n_buckets; diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 24de3ae..4aeedb9 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -169,18 +169,12 @@ } static void -multi_reap_range(const struct multi_context *m, int start_bucket, int end_bucket) +multi_reap_range(const struct multi_context *m, uint32_t start_bucket, uint32_t end_bucket) { struct gc_arena gc = gc_new(); struct hash_iterator hi; struct hash_element *he; - if (start_bucket < 0) - { - start_bucket = 0; - end_bucket = hash_n_buckets(m->vhash); - } - dmsg(D_MULTI_DEBUG, "MULTI: REAP range %d -> %d", start_bucket, end_bucket); hash_iterator_init_range(m->vhash, &hi, start_bucket, end_bucket); while ((he = hash_iterator_next(&hi)) != NULL) @@ -201,11 +195,11 @@ static void multi_reap_all(const struct multi_context *m) { - multi_reap_range(m, -1, 0); + multi_reap_range(m, 0, hash_n_buckets(m->vhash)); } static struct multi_reap * -multi_reap_new(int buckets_per_pass) +multi_reap_new(uint32_t buckets_per_pass) { struct multi_reap *mr; ALLOC_OBJ(mr, struct multi_reap); @@ -237,10 +231,10 @@ /* * How many buckets in vhash to reap per pass. */ -static int -reap_buckets_per_pass(int n_buckets) +static uint32_t +reap_buckets_per_pass(uint32_t n_buckets) { - return constrain_int(n_buckets / REAP_DIVISOR, REAP_MIN, REAP_MAX); + return constrain_uint(n_buckets / REAP_DIVISOR, REAP_MIN, REAP_MAX); } #ifdef ENABLE_MANAGEMENT diff --git a/src/openvpn/multi.h b/src/openvpn/multi.h index e87e465..7c894d8 100644 --- a/src/openvpn/multi.h +++ b/src/openvpn/multi.h @@ -51,8 +51,8 @@ */ struct multi_reap { - int bucket_base; - int buckets_per_pass; + uint32_t bucket_base; + uint32_t buckets_per_pass; time_t last_call; }; diff --git a/src/openvpn/options.c b/src/openvpn/options.c index e909691..d3db03b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -7945,11 +7945,11 @@ } else if (streq(p[0], "hash-size") && p[1] && p[2] && !p[3]) { - int real, virtual; + uint32_t real, virtual; VERIFY_PERMISSION(OPT_P_GENERAL); - real = atoi_warn(p[1], msglevel); - virtual = atoi_warn(p[2], msglevel); + real = positive_atoi(p[1], msglevel); + virtual = positive_atoi(p[2], msglevel); if (real < 1 || virtual < 1) { msg(msglevel, "--hash-size sizes must be >= 1 (preferably a power of 2)"); diff --git a/src/openvpn/options.h b/src/openvpn/options.h index a04aa83..9a92fa9 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -499,8 +499,8 @@ struct in6_addr ifconfig_ipv6_pool_base; /* IPv6 */ int ifconfig_ipv6_pool_netbits; /* IPv6 */ - int real_hash_size; - int virtual_hash_size; + uint32_t real_hash_size; + uint32_t virtual_hash_size; const char *client_connect_script; const char *client_disconnect_script; const char *learn_address_script; diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvpn/test_misc.c index 01e1a5d..07e0880 100644 --- a/tests/unit_tests/openvpn/test_misc.c +++ b/tests/unit_tests/openvpn/test_misc.c @@ -128,7 +128,7 @@ word_hash_function(const void *key, uint32_t iv) { const char *str = (const char *)key; - const int len = strlen(str); + const uint32_t len = (uint32_t)strlen(str); return hash_func((const uint8_t *)str, len, iv); } @@ -138,11 +138,11 @@ return strcmp((const char *)key1, (const char *)key2) == 0; } -static unsigned long +static uint32_t get_random(void) { /* rand() is not very random, but it's C99 and this is just for testing */ - return rand(); + return (uint32_t)rand(); } static struct hash_element * @@ -176,7 +176,7 @@ struct hash *hash = hash_init(10000, get_random(), word_hash_function, word_compare_function); struct hash *nhash = hash_init(256, get_random(), word_hash_function, word_compare_function); - printf("hash_init n_buckets=%d mask=0x%08x\n", hash->n_buckets, hash->mask); + printf("hash_init n_buckets=%u mask=0x%08x\n", hash->n_buckets, hash->mask); char wordfile[PATH_MAX] = { 0 }; openvpn_test_get_srcdir_dir(wordfile, PATH_MAX, "/../../../COPYRIGHT.GPL"); @@ -254,10 +254,10 @@ /* output contents of hash table */ { - ptr_type inc = 0; + uint32_t inc = 0; int count = 0; - for (ptr_type base = 0; base < hash_n_buckets(hash); base += inc) + for (uint32_t base = 0; base < hash_n_buckets(hash); base += inc) { struct hash_iterator hi; struct hash_element *he; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1119?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: I3334465738fb1fbf508dfd719b6a238b500cc0ae Gerrit-Change-Number: 1119 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:46
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email to look at the new patch set (#4). Change subject: forward: Make sure pip flags are treated as unsigned ...................................................................... forward: Make sure pip flags are treated as unsigned process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings. Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/forward.h 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/1108/4 diff --git a/src/openvpn/forward.h b/src/openvpn/forward.h index d564149..79d0f8b 100644 --- a/src/openvpn/forward.h +++ b/src/openvpn/forward.h @@ -314,13 +314,13 @@ */ void reschedule_multi_process(struct context *c); -#define PIPV4_PASSTOS (1 << 0) -#define PIP_MSSFIX (1 << 1) /* v4 and v6 */ -#define PIP_OUTGOING (1 << 2) -#define PIPV4_EXTRACT_DHCP_ROUTER (1 << 3) -#define PIPV4_CLIENT_NAT (1 << 4) -#define PIPV6_ICMP_NOHOST_CLIENT (1 << 5) -#define PIPV6_ICMP_NOHOST_SERVER (1 << 6) +#define PIPV4_PASSTOS (1u << 0) +#define PIP_MSSFIX (1u << 1) /* v4 and v6 */ +#define PIP_OUTGOING (1u << 2) +#define PIPV4_EXTRACT_DHCP_ROUTER (1u << 3) +#define PIPV4_CLIENT_NAT (1u << 4) +#define PIPV6_ICMP_NOHOST_CLIENT (1u << 5) +#define PIPV6_ICMP_NOHOST_SERVER (1u << 6) void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf, -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?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: I6d42c67b8dc5512933bed482bd9c2be80c63e993 Gerrit-Change-Number: 1108 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:43
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1106?usp=email to look at the new patch set (#4). Change subject: options: Make sure option types are treated as unsigned ...................................................................... options: Make sure option types are treated as unsigned verify_permissions already expects them to be unsigned, make sure they are to avoid spurious conversion warnings. Change-Id: I1d27cb81d32058e40147e1d6dcd12df7f6cb2b30 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/options.h 1 file changed, 32 insertions(+), 32 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/06/1106/4 diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 5ee6e93..7dc2912 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -729,38 +729,38 @@ /* * Option classes. */ -#define OPT_P_GENERAL (1 << 0) -#define OPT_P_UP (1 << 1) -#define OPT_P_ROUTE (1 << 2) -#define OPT_P_DHCPDNS (1 << 3) /* includes ip windows options like */ -#define OPT_P_SCRIPT (1 << 4) -#define OPT_P_SETENV (1 << 5) -#define OPT_P_SHAPER (1 << 6) -#define OPT_P_TIMER (1 << 7) -#define OPT_P_PERSIST (1 << 8) -#define OPT_P_PERSIST_IP (1 << 9) -#define OPT_P_COMP (1 << 10) /* TODO */ -#define OPT_P_MESSAGES (1 << 11) -#define OPT_P_NCP (1 << 12) /**< Negotiable crypto parameters */ -#define OPT_P_TLS_PARMS (1 << 13) /* TODO */ -#define OPT_P_MTU (1 << 14) /* TODO */ -#define OPT_P_NICE (1 << 15) -#define OPT_P_PUSH (1 << 16) -#define OPT_P_INSTANCE (1 << 17) /**< allowed in ccd, client-connect etc*/ -#define OPT_P_CONFIG (1 << 18) -#define OPT_P_EXPLICIT_NOTIFY (1 << 19) -#define OPT_P_ECHO (1 << 20) -#define OPT_P_INHERIT (1 << 21) -#define OPT_P_ROUTE_EXTRAS (1 << 22) -#define OPT_P_PULL_MODE (1 << 23) -#define OPT_P_PLUGIN (1 << 24) -#define OPT_P_SOCKBUF (1 << 25) -#define OPT_P_SOCKFLAGS (1 << 26) -#define OPT_P_CONNECTION (1 << 27) -#define OPT_P_PEER_ID (1 << 28) -#define OPT_P_INLINE (1 << 29) -#define OPT_P_PUSH_MTU (1 << 30) -#define OPT_P_ROUTE_TABLE (1 << 31) +#define OPT_P_GENERAL (1u << 0) +#define OPT_P_UP (1u << 1) +#define OPT_P_ROUTE (1u << 2) +#define OPT_P_DHCPDNS (1u << 3) /* includes ip windows options like */ +#define OPT_P_SCRIPT (1u << 4) +#define OPT_P_SETENV (1u << 5) +#define OPT_P_SHAPER (1u << 6) +#define OPT_P_TIMER (1u << 7) +#define OPT_P_PERSIST (1u << 8) +#define OPT_P_PERSIST_IP (1u << 9) +#define OPT_P_COMP (1u << 10) /* TODO */ +#define OPT_P_MESSAGES (1u << 11) +#define OPT_P_NCP (1u << 12) /**< Negotiable crypto parameters */ +#define OPT_P_TLS_PARMS (1u << 13) /* TODO */ +#define OPT_P_MTU (1u << 14) /* TODO */ +#define OPT_P_NICE (1u << 15) +#define OPT_P_PUSH (1u << 16) +#define OPT_P_INSTANCE (1u << 17) /**< allowed in ccd, client-connect etc*/ +#define OPT_P_CONFIG (1u << 18) +#define OPT_P_EXPLICIT_NOTIFY (1u << 19) +#define OPT_P_ECHO (1u << 20) +#define OPT_P_INHERIT (1u << 21) +#define OPT_P_ROUTE_EXTRAS (1u << 22) +#define OPT_P_PULL_MODE (1u << 23) +#define OPT_P_PLUGIN (1u << 24) +#define OPT_P_SOCKBUF (1u << 25) +#define OPT_P_SOCKFLAGS (1u << 26) +#define OPT_P_CONNECTION (1u << 27) +#define OPT_P_PEER_ID (1u << 28) +#define OPT_P_INLINE (1u << 29) +#define OPT_P_PUSH_MTU (1u << 30) +#define OPT_P_ROUTE_TABLE (1u << 31) #define OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE)) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1106?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: I1d27cb81d32058e40147e1d6dcd12df7f6cb2b30 Gerrit-Change-Number: 1106 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:40
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1103?usp=email to look at the new patch set (#4). Change subject: crypto: Make sure crypto flags are treated as unsigned ...................................................................... crypto: Make sure crypto flags are treated as unsigned crypto_options.flags is already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I89820c76e2e099f7acb817c71c8aeb83736ac556 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/crypto.h 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/03/1103/4 diff --git a/src/openvpn/crypto.h b/src/openvpn/crypto.h index cee4145..efd7f60 100644 --- a/src/openvpn/crypto.h +++ b/src/openvpn/crypto.h @@ -342,39 +342,39 @@ * keeping state between successive * OpenVPN process startups. */ -#define CO_PACKET_ID_LONG_FORM (1 << 0) +#define CO_PACKET_ID_LONG_FORM (1u << 0) /**< Bit-flag indicating whether to use * OpenVPN's long packet ID format. */ -#define CO_IGNORE_PACKET_ID (1 << 1) +#define CO_IGNORE_PACKET_ID (1u << 1) /**< Bit-flag indicating whether to ignore * the packet ID of a received packet. * This flag is used during processing * of the first packet received from a * client. */ -#define CO_MUTE_REPLAY_WARNINGS (1 << 2) +#define CO_MUTE_REPLAY_WARNINGS (1u << 2) /**< Bit-flag indicating not to display * replay warnings. */ -#define CO_USE_TLS_KEY_MATERIAL_EXPORT (1 << 3) +#define CO_USE_TLS_KEY_MATERIAL_EXPORT (1u << 3) /**< Bit-flag indicating that data channel key derivation * is done using TLS keying material export [RFC5705] */ -#define CO_RESEND_WKC (1 << 4) +#define CO_RESEND_WKC (1u << 4) /**< Bit-flag indicating that the client is expected to * resend the wrapped client key with the 2nd packet (packet-id 1) * like with the HARD_RESET_CLIENT_V3 packet */ -#define CO_FORCE_TLSCRYPTV2_COOKIE (1 << 5) +#define CO_FORCE_TLSCRYPTV2_COOKIE (1u << 5) /**< Bit-flag indicating that we do not allow clients that do * not support resending the wrapped client key (WKc) with the * third packet of the three-way handshake */ -#define CO_USE_CC_EXIT_NOTIFY (1 << 6) +#define CO_USE_CC_EXIT_NOTIFY (1u << 6) /**< Bit-flag indicating that explicit exit notifies should be * sent via the control channel instead of using an OCC message */ -#define CO_USE_DYNAMIC_TLS_CRYPT (1 << 7) +#define CO_USE_DYNAMIC_TLS_CRYPT (1u << 7) /**< Bit-flag indicating that renegotiations are using tls-crypt * with a TLS-EKM derived key. */ -#define CO_EPOCH_DATA_KEY_FORMAT (1 << 8) +#define CO_EPOCH_DATA_KEY_FORMAT (1u << 8) /**< Bit-flag indicating the epoch the data format. This format * has the AEAD tag at the end of the packet and is using a longer * 64-bit packet id that is split into a 16 bit epoch and 48 bit -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1103?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: I89820c76e2e099f7acb817c71c8aeb83736ac556 Gerrit-Change-Number: 1103 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:39
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1102?usp=email to look at the new patch set (#4). Change subject: comp: Make sure comp flags are treated as unsigned ...................................................................... comp: Make sure comp flags are treated as unsigned compress_options.flags is already unsigned. Make sure the individual flags are as well to avoid spurious conversion warnings. Change-Id: I6a0d352a039a0936cb9bbedf6168cd6eecd053ea Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/comp.h 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/02/1102/4 diff --git a/src/openvpn/comp.h b/src/openvpn/comp.h index 265e15d..0354896 100644 --- a/src/openvpn/comp.h +++ b/src/openvpn/comp.h @@ -32,23 +32,23 @@ /* Compression flags */ /* Removed - #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_ADAPTIVE (1u<<0) / * COMP_ALG_LZO only * / + #define COMP_F_ALLOW_COMPRESS (1u<<1) / * not only incoming is compressed but also outgoing * / */ /** initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_SWAP (1 << 2) +#define COMP_F_SWAP (1u << 2) /** tell server that we only support compression stubs */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1 << 3) +#define COMP_F_ADVERTISE_STUBS_ONLY (1u << 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) +#define COMP_F_ALLOW_STUB_ONLY (1u << 4) /** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_MIGRATE (1 << 5) +#define COMP_F_MIGRATE (1u << 5) /** Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_ASYM (1 << 6) +#define COMP_F_ALLOW_ASYM (1u << 6) /** Do not allow compression framing (breaks DCO) */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1 << 7) +#define COMP_F_ALLOW_NOCOMP_ONLY (1u << 7) /* algorithms */ #define COMP_ALG_UNDEF 0 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1102?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: I6a0d352a039a0936cb9bbedf6168cd6eecd053ea Gerrit-Change-Number: 1102 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:39
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1107?usp=email to look at the new patch set (#4). Change subject: events: Make sure rwflags are treated as unsigned ...................................................................... events: Make sure rwflags are treated as unsigned event_set_return.rwflags is already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I0272b709b907545de05bfded03a649b259ce5af6 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/event.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/07/1107/4 diff --git a/src/openvpn/event.h b/src/openvpn/event.h index 8422996..8a89a25 100644 --- a/src/openvpn/event.h +++ b/src/openvpn/event.h @@ -35,8 +35,8 @@ #define WRITE_SHIFT 1 #define EVENT_UNDEF 4 -#define EVENT_READ (1 << READ_SHIFT) -#define EVENT_WRITE (1 << WRITE_SHIFT) +#define EVENT_READ (1u << READ_SHIFT) +#define EVENT_WRITE (1u << WRITE_SHIFT) /* event flags returned by io_wait. * -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1107?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: I0272b709b907545de05bfded03a649b259ce5af6 Gerrit-Change-Number: 1107 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 16:00:37
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1105?usp=email to look at the new patch set (#4). Change subject: manage: Make sure various management flags are treated as unsigned ...................................................................... manage: Make sure various management flags are treated as unsigned The variables that hold them are already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I0937165c5efa95136bd951345a076e33e396f26a Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/manage.h M src/openvpn/options.h 2 files changed, 40 insertions(+), 40 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1105/4 diff --git a/src/openvpn/manage.h b/src/openvpn/manage.h index 083caf5..911e15b 100644 --- a/src/openvpn/manage.h +++ b/src/openvpn/manage.h @@ -24,24 +24,24 @@ #define MANAGE_H /* management_open flags */ -#define MF_SERVER (1 << 0) -#define MF_QUERY_PASSWORDS (1 << 1) -#define MF_HOLD (1 << 2) -#define MF_SIGNAL (1 << 3) -#define MF_FORGET_DISCONNECT (1 << 4) -#define MF_CONNECT_AS_CLIENT (1 << 5) -#define MF_CLIENT_AUTH (1 << 6) -/* #define MF_CLIENT_PF (1<<7) *REMOVED FEATURE* */ -#define MF_UNIX_SOCK (1 << 8) -#define MF_EXTERNAL_KEY (1 << 9) -#define MF_EXTERNAL_KEY_NOPADDING (1 << 10) -#define MF_EXTERNAL_KEY_PKCS1PAD (1 << 11) -#define MF_UP_DOWN (1 << 12) -#define MF_QUERY_REMOTE (1 << 13) -#define MF_QUERY_PROXY (1 << 14) -#define MF_EXTERNAL_CERT (1 << 15) -#define MF_EXTERNAL_KEY_PSSPAD (1 << 16) -#define MF_EXTERNAL_KEY_DIGEST (1 << 17) +#define MF_SERVER (1u << 0) +#define MF_QUERY_PASSWORDS (1u << 1) +#define MF_HOLD (1u << 2) +#define MF_SIGNAL (1u << 3) +#define MF_FORGET_DISCONNECT (1u << 4) +#define MF_CONNECT_AS_CLIENT (1u << 5) +#define MF_CLIENT_AUTH (1u << 6) +/* #define MF_CLIENT_PF (1u << 7) *REMOVED FEATURE* */ +#define MF_UNIX_SOCK (1u << 8) +#define MF_EXTERNAL_KEY (1u << 9) +#define MF_EXTERNAL_KEY_NOPADDING (1u << 10) +#define MF_EXTERNAL_KEY_PKCS1PAD (1u << 11) +#define MF_UP_DOWN (1u << 12) +#define MF_QUERY_REMOTE (1u << 13) +#define MF_QUERY_PROXY (1u << 14) +#define MF_EXTERNAL_CERT (1u << 15) +#define MF_EXTERNAL_KEY_PSSPAD (1u << 16) +#define MF_EXTERNAL_KEY_DIGEST (1u << 17) #ifdef ENABLE_MANAGEMENT @@ -64,9 +64,9 @@ { unsigned long cid; -#define DAF_CONNECTION_ESTABLISHED (1 << 0) -#define DAF_CONNECTION_CLOSED (1 << 1) -#define DAF_INITIAL_AUTH (1 << 2) +#define DAF_CONNECTION_ESTABLISHED (1u << 0) +#define DAF_CONNECTION_CLOSED (1u << 1) +#define DAF_INITIAL_AUTH (1u << 2) unsigned int flags; unsigned int mda_key_id_counter; @@ -117,23 +117,23 @@ union log_entry_union u; }; -#define LOG_PRINT_LOG_PREFIX (1 << 0) -#define LOG_PRINT_ECHO_PREFIX (1 << 1) -#define LOG_PRINT_STATE_PREFIX (1 << 2) +#define LOG_PRINT_LOG_PREFIX (1u << 0) +#define LOG_PRINT_ECHO_PREFIX (1u << 1) +#define LOG_PRINT_STATE_PREFIX (1u << 2) -#define LOG_PRINT_INT_DATE (1 << 3) -#define LOG_PRINT_MSG_FLAGS (1 << 4) -#define LOG_PRINT_STATE (1 << 5) -#define LOG_PRINT_LOCAL_IP (1 << 6) +#define LOG_PRINT_INT_DATE (1u << 3) +#define LOG_PRINT_MSG_FLAGS (1u << 4) +#define LOG_PRINT_STATE (1u << 5) +#define LOG_PRINT_LOCAL_IP (1u << 6) -#define LOG_PRINT_CRLF (1 << 7) -#define LOG_FATAL_NOTIFY (1 << 8) +#define LOG_PRINT_CRLF (1u << 7) +#define LOG_FATAL_NOTIFY (1u << 8) -#define LOG_PRINT_INTVAL (1 << 9) +#define LOG_PRINT_INTVAL (1u << 9) -#define LOG_PRINT_REMOTE_IP (1 << 10) +#define LOG_PRINT_REMOTE_IP (1u << 10) -#define LOG_ECHO_TO_LOG (1 << 11) +#define LOG_ECHO_TO_LOG (1u << 11) const char *log_entry_print(const struct log_entry *e, unsigned int flags, struct gc_arena *gc); @@ -175,7 +175,7 @@ { void *arg; -#define MCF_SERVER (1 << 0) /* is OpenVPN being run as a server? */ +#define MCF_SERVER (1u << 0) /* is OpenVPN being run as a server? */ unsigned int flags; void (*status)(void *arg, const int version, struct status_output *so); @@ -253,9 +253,9 @@ int client_gid; /* flags for handling the management interface "signal" command */ -#define MANSIG_IGNORE_USR1_HUP (1 << 0) -#define MANSIG_MAP_USR1_TO_HUP (1 << 1) -#define MANSIG_MAP_USR1_TO_TERM (1 << 2) +#define MANSIG_IGNORE_USR1_HUP (1u << 0) +#define MANSIG_MAP_USR1_TO_HUP (1u << 1) +#define MANSIG_MAP_USR1_TO_TERM (1u << 2) unsigned int mansig; }; diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 38e67c8..5ee6e93 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -147,14 +147,14 @@ int explicit_exit_notification; /* Explicitly tell peer when we are exiting via OCC_EXIT or [RESTART] message */ -#define CE_DISABLED (1 << 0) -#define CE_MAN_QUERY_PROXY (1 << 1) +#define CE_DISABLED (1u << 0) +#define CE_MAN_QUERY_PROXY (1u << 1) #define CE_MAN_QUERY_REMOTE_UNDEF 0 #define CE_MAN_QUERY_REMOTE_QUERY 1 #define CE_MAN_QUERY_REMOTE_ACCEPT 2 #define CE_MAN_QUERY_REMOTE_MOD 3 #define CE_MAN_QUERY_REMOTE_SKIP 4 -#define CE_MAN_QUERY_REMOTE_MASK (0x07) +#define CE_MAN_QUERY_REMOTE_MASK (0x07u) #define CE_MAN_QUERY_REMOTE_SHIFT (2) unsigned int flags; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1105?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: I0937165c5efa95136bd951345a076e33e396f26a Gerrit-Change-Number: 1105 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 15:09:00
|
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1130?usp=email ) Change subject: Add clang-format reformat commit to .git-blame-ignore-revs ...................................................................... Add clang-format reformat commit to .git-blame-ignore-revs Change-Id: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32528.html Signed-off-by: Gert Doering <ge...@gr...> --- M .git-blame-ignore-revs 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1fafaac..290e4c3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -48,3 +48,8 @@ # Reformat for sp_after_comma=add e51d9a73693ee742b36e19fb1718e5e27167831d + +# The Great Reformatting of 2025, switching to clang-format +3cca3367e6e0ffeccb8e39cb2c739d1dcb086701 +# Switching to ColumnLimit 0 for clang-format +21f7d6e1ad65b1f7db673bc98764dc7325858e0b -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1130?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: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Gerrit-Change-Number: 1130 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: merged |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 15:08:59
|
cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1130?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Add clang-format reformat commit to .git-blame-ignore-revs ...................................................................... Add clang-format reformat commit to .git-blame-ignore-revs Change-Id: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32528.html Signed-off-by: Gert Doering <ge...@gr...> --- M .git-blame-ignore-revs 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1130/3 diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1fafaac..290e4c3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -48,3 +48,8 @@ # Reformat for sp_after_comma=add e51d9a73693ee742b36e19fb1718e5e27167831d + +# The Great Reformatting of 2025, switching to clang-format +3cca3367e6e0ffeccb8e39cb2c739d1dcb086701 +# Switching to ColumnLimit 0 for clang-format +21f7d6e1ad65b1f7db673bc98764dc7325858e0b -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1130?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: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Gerrit-Change-Number: 1130 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: newpatchset |
From: Gert D. <ge...@gr...> - 2025-08-05 15:08:56
|
Not much to test here, except point "git blame" at your favourite piece of source code, and see the original commits, not the "everything changed by clang-format" changes :-) - it's actually not *that* bad this time, compared to the first Great Reformat, but still, quite distracting. Your patch has been applied to the master branch. commit 2cc23415889f5d1b1a6d1837332e8c64eeacbb31 Author: Frank Lichtenheld Date: Tue Aug 5 17:04:57 2025 +0200 Add clang-format reformat commit to .git-blame-ignore-revs Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32528.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: Gert D. <ge...@gr...> - 2025-08-05 15:05:17
|
From: Frank Lichtenheld <fr...@li...> Change-Id: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> --- 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/+/1130 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <ge...@gr...> diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1fafaac..290e4c3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -48,3 +48,8 @@ # Reformat for sp_after_comma=add e51d9a73693ee742b36e19fb1718e5e27167831d + +# The Great Reformatting of 2025, switching to clang-format +3cca3367e6e0ffeccb8e39cb2c739d1dcb086701 +# Switching to ColumnLimit 0 for clang-format +21f7d6e1ad65b1f7db673bc98764dc7325858e0b |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 15:05:04
|
Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1130?usp=email ) Change subject: Add clang-format reformat commit to .git-blame-ignore-revs ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1130?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: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Gerrit-Change-Number: 1130 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Tue, 05 Aug 2025 15:04:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 13:47:04
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1130?usp=email to look at the new patch set (#2). Change subject: Add clang-format reformat commit to .git-blame-ignore-revs ...................................................................... Add clang-format reformat commit to .git-blame-ignore-revs Change-Id: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M .git-blame-ignore-revs 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1130/2 diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1fafaac..290e4c3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -48,3 +48,8 @@ # Reformat for sp_after_comma=add e51d9a73693ee742b36e19fb1718e5e27167831d + +# The Great Reformatting of 2025, switching to clang-format +3cca3367e6e0ffeccb8e39cb2c739d1dcb086701 +# Switching to ColumnLimit 0 for clang-format +21f7d6e1ad65b1f7db673bc98764dc7325858e0b -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1130?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: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Gerrit-Change-Number: 1130 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 13:37:20
|
Attention is currently required from: cron2. cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1129?usp=email ) 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 <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32523.html Signed-off-by: Gert Doering <ge...@gr...> --- 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 running version of OpenVPN\n"); + fprintf(stderr, + "sample-client-connect: this plugin is incompatible with the 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 != OPENVPN_PLUGINv3_STRUCTVER) { - printf( - "log_v3: ** ERROR ** Incompatible 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/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 != 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 between 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[] = { - { "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 = 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 (fatal 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 informational messages */ -#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_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 compression 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 */ -#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 server errors */ -#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ -#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* show fragmentation errors */ -#define D_ALIGN_ERRORS LOGLEV(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_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 compression 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 */ +#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 server errors */ +#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ +#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* 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 http proxy control packets */ -#define D_ARGV LOGLEV(2, 25, 0) /* show struct argv errors */ +#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 control packets */ +#define D_ARGV 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 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 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 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_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 exceeded 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 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 */ +#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 */ +#define D_RESTART 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_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 exceeded 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 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 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 multi messages */ -#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ -#define D_INIT_MEDIUM LOGLEV(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-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_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 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 multi messages */ +#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ +#define D_INIT_MEDIUM LOGLEV(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-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 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 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 driver debug info */ -#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) /* show DCO related lowlevel debug messages */ -#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show signal related debug 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 driver debug info */ +#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) /* 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_SHOW_KEY_SOURCE LOGLEV(7, 70, M_DEBUG) /* show data channel key source entropy */ @@ -150,32 +150,32 @@ #define D_SHOW_OCC LOGLEV(7, 74, M_DEBUG) /* show options compatibility string */ -#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* show VLAN tagging/untagging debug info */ +#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 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 */ -#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* show detailed info from 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 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 */ +#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* 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 LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ -#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/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_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) /* 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 */ +#define D_TLS_DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ +#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/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_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) /* 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 */ -#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ +#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ -#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry debugging 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 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..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 = 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) && defined(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,TUN Write Trunc,Pre-encrypt Trunc,Post-decrypt Trunc"); hash_iterator_init(m->hash, &hi); while ((he = 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 = ntlmv2_response + 16; /* inside ntlmv2_response, length: 128 */ int ntlmv2_blob_size = 0; - int phase3_bufpos = 0x40; /* offset to next security buffer data to be added */ + int phase3_bufpos = 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 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 doing any real work!\n"); + fprintf(stderr, "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/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 know 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 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(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 = 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 discovery options on socket */ + int mtu_discover_type; /* used if OS supports setting Path MTU 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 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 fragment; /* internal fragmentation size */ + bool fragment_encap; /* true if --fragment had the "mtu" 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 tell peer when we are exiting 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[] = { "block-ipv6", "block-outside-dns", - "dhcp-option", "dns", - "ifconfig", "ifconfig-ipv6", +static const char *updatable_options[] = { "block-ipv6", "block-outside-dns", + "dhcp-option", "dns", + "ifconfig", "ifconfig-ipv6", "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", + "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, route, netsh, etc.*/ -#define SSEC_SCRIPTS 2 /* allow calling of built-in programs and user-defined 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 receive a password + as an environmental variable */ +#define SSEC_PW_ENV 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_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 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; /* 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 */ + 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 packet 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/plugin, ccd,...) */ 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 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 @@ #define MAKE_DI(x) { NID_##x, x, sizeof(x) } + /* clang-format off */ DIG_INFO dinfo[] = { MAKE_DI(sha1), MAKE_DI(sha256), MAKE_DI(sha384), MAKE_DI(sha512), MAKE_DI(sha224), MAKE_DI(sha512_224), MAKE_DI(sha512_256), { 0, NULL, 0 } }; + /* clang-format on */ size_t out_len = 0; bool ret = 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 pDeviceInfoData, _Inout_ LPBOOL pbRebootRequired) { - SP_REMOVEDEVICE_PARAMS params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_REMOVE, }, @@ -281,10 +279,8 @@ change_device_state(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DATA pDeviceInfoData, _In_ BOOL bEnable, _Inout_ LPBOOL pbRebootRequired) { - SP_PROPCHANGE_PARAMS params = - { - .ClassInstallHeader = - { + SP_PROPCHANGE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_PROPERTYCHANGE, }, @@ -768,10 +764,8 @@ if (dwResult != ERROR_SUCCESS) { /* The adapter was installed. But, the adapter ID was unobtainable. Clean-up. */ - SP_REMOVEDEVICE_PARAMS removedevice_params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS removedevice_params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = 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] = 0x23; + (BPTR(&buf))[i] = 0x23; verdict = 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] = 0x23; + (BPTR(&buf))[20] = 0x23; verdict = 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=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibd900adfc775b7f785f1d5630184a124f5d8ff4b Gerrit-Change-Number: 1129 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: cron2 <ge...@gr...> Gerrit-MessageType: merged |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 13:37:14
|
Attention is currently required from: cron2. cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1129?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by cron2 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 <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32523.html Signed-off-by: Gert Doering <ge...@gr...> --- 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(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/29/1129/3 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 running version of OpenVPN\n"); + fprintf(stderr, + "sample-client-connect: this plugin is incompatible with the 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 != OPENVPN_PLUGINv3_STRUCTVER) { - printf( - "log_v3: ** ERROR ** Incompatible 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/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 != 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 between 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[] = { - { "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 = 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 (fatal 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 informational messages */ -#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_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 compression 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 */ -#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 server errors */ -#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ -#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* show fragmentation errors */ -#define D_ALIGN_ERRORS LOGLEV(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_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 compression 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 */ +#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 server errors */ +#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ +#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* 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 http proxy control packets */ -#define D_ARGV LOGLEV(2, 25, 0) /* show struct argv errors */ +#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 control packets */ +#define D_ARGV 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 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 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 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_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 exceeded 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 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 */ +#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 */ +#define D_RESTART 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_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 exceeded 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 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 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 multi messages */ -#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ -#define D_INIT_MEDIUM LOGLEV(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-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_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 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 multi messages */ +#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ +#define D_INIT_MEDIUM LOGLEV(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-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 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 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 driver debug info */ -#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) /* show DCO related lowlevel debug messages */ -#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show signal related debug 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 driver debug info */ +#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) /* 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_SHOW_KEY_SOURCE LOGLEV(7, 70, M_DEBUG) /* show data channel key source entropy */ @@ -150,32 +150,32 @@ #define D_SHOW_OCC LOGLEV(7, 74, M_DEBUG) /* show options compatibility string */ -#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* show VLAN tagging/untagging debug info */ +#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 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 */ -#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* show detailed info from 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 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 */ +#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* 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 LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ -#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/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_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) /* 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 */ +#define D_TLS_DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ +#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/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_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) /* 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 */ -#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ +#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ -#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry debugging 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 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..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 = 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) && defined(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,TUN Write Trunc,Pre-encrypt Trunc,Post-decrypt Trunc"); hash_iterator_init(m->hash, &hi); while ((he = 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 = ntlmv2_response + 16; /* inside ntlmv2_response, length: 128 */ int ntlmv2_blob_size = 0; - int phase3_bufpos = 0x40; /* offset to next security buffer data to be added */ + int phase3_bufpos = 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 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 doing any real work!\n"); + fprintf(stderr, "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/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 know 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 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(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 = 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 discovery options on socket */ + int mtu_discover_type; /* used if OS supports setting Path MTU 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 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 fragment; /* internal fragmentation size */ + bool fragment_encap; /* true if --fragment had the "mtu" 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 tell peer when we are exiting 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[] = { "block-ipv6", "block-outside-dns", - "dhcp-option", "dns", - "ifconfig", "ifconfig-ipv6", +static const char *updatable_options[] = { "block-ipv6", "block-outside-dns", + "dhcp-option", "dns", + "ifconfig", "ifconfig-ipv6", "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", + "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, route, netsh, etc.*/ -#define SSEC_SCRIPTS 2 /* allow calling of built-in programs and user-defined 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 receive a password + as an environmental variable */ +#define SSEC_PW_ENV 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_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 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; /* 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 */ + 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 packet 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/plugin, ccd,...) */ 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 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 @@ #define MAKE_DI(x) { NID_##x, x, sizeof(x) } + /* clang-format off */ DIG_INFO dinfo[] = { MAKE_DI(sha1), MAKE_DI(sha256), MAKE_DI(sha384), MAKE_DI(sha512), MAKE_DI(sha224), MAKE_DI(sha512_224), MAKE_DI(sha512_256), { 0, NULL, 0 } }; + /* clang-format on */ size_t out_len = 0; bool ret = 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 pDeviceInfoData, _Inout_ LPBOOL pbRebootRequired) { - SP_REMOVEDEVICE_PARAMS params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_REMOVE, }, @@ -281,10 +279,8 @@ change_device_state(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DATA pDeviceInfoData, _In_ BOOL bEnable, _Inout_ LPBOOL pbRebootRequired) { - SP_PROPCHANGE_PARAMS params = - { - .ClassInstallHeader = - { + SP_PROPCHANGE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_PROPERTYCHANGE, }, @@ -768,10 +764,8 @@ if (dwResult != ERROR_SUCCESS) { /* The adapter was installed. But, the adapter ID was unobtainable. Clean-up. */ - SP_REMOVEDEVICE_PARAMS removedevice_params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS removedevice_params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = 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] = 0x23; + (BPTR(&buf))[i] = 0x23; verdict = 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] = 0x23; + (BPTR(&buf))[20] = 0x23; verdict = 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=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibd900adfc775b7f785f1d5630184a124f5d8ff4b Gerrit-Change-Number: 1129 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: cron2 <ge...@gr...> Gerrit-MessageType: newpatchset |
From: Gert D. <ge...@gr...> - 2025-08-05 13:36:51
|
This has been stared-at, and subjected to testing in the client and server testbeds ("you never know"). Some of the changes are slightly non-obvious - one thing we discovered is that clang-format tries really hard to align end-of-line comments, but only if you do not exceed "ColumnLimit". If you do, all these comments get "1 space, only, no matter how much they had before". So, without the limit, some #endif comments ended up going to column 130-ish, which made the result non helpful - so you see comments disappear now, because the #ifdef/endif clauses were so short that it was obvious. Also, errlevel.h got re-aligned now... which is nice, but makes this look much larger. Your patch has been applied to the master branch. commit 21f7d6e1ad65b1f7db673bc98764dc7325858e0b Author: Frank Lichtenheld Date: Tue Aug 5 15:27:01 2025 +0200 clang-format: Switch to ColumnLimit 0 Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32523.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: Gert D. <ge...@gr...> - 2025-08-05 13:27:22
|
From: Frank Lichtenheld <fr...@li...> 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 <fr...@li...> Acked-by: Gert Doering <ge...@gr...> --- 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/+/1129 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <ge...@gr...> 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 running version of OpenVPN\n"); + fprintf(stderr, + "sample-client-connect: this plugin is incompatible with the 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 != OPENVPN_PLUGINv3_STRUCTVER) { - printf( - "log_v3: ** ERROR ** Incompatible 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/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 != 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 between 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[] = { - { "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 = 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 (fatal 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 informational messages */ -#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_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 compression 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 */ -#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 server errors */ -#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ -#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* show fragmentation errors */ -#define D_ALIGN_ERRORS LOGLEV(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_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 compression 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 */ +#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 server errors */ +#define D_EVENT_ERRORS LOGLEV(1, 10, M_NONFATAL) /* show event.[ch] errors */ +#define D_PUSH_ERRORS LOGLEV(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_NONFATAL) /* 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 http proxy control packets */ -#define D_ARGV LOGLEV(2, 25, 0) /* show struct argv errors */ +#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 control packets */ +#define D_ARGV 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 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 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 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_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 exceeded 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 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 */ +#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 */ +#define D_RESTART 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_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 exceeded 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 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 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 multi messages */ -#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ -#define D_INIT_MEDIUM LOGLEV(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-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_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 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 multi messages */ +#define D_X509_ATTR LOGLEV(4, 59, 0) /* show x509-track attributes on connection */ +#define D_INIT_MEDIUM LOGLEV(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-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 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 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 driver debug info */ -#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) /* show DCO related lowlevel debug messages */ -#define D_SIGNAL_DEBUG LOGLEV(6, 69, M_DEBUG) /* show signal related debug 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 driver debug info */ +#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) /* 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_SHOW_KEY_SOURCE LOGLEV(7, 70, M_DEBUG) /* show data channel key source entropy */ @@ -150,32 +150,32 @@ #define D_SHOW_OCC LOGLEV(7, 74, M_DEBUG) /* show options compatibility string */ -#define D_VLAN_DEBUG LOGLEV(7, 74, M_DEBUG) /* show VLAN tagging/untagging debug info */ +#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 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 */ -#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* show detailed info from 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 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 */ +#define D_GREMLIN_VERBOSE LOGLEV(8, 70, M_DEBUG) /* show 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_DEBUG) /* 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 LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ -#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/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_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) /* 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 */ +#define D_TLS_DEBUG LOGLEV(9, 70, M_DEBUG) /* show detailed info from TLS routines */ +#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/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_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) /* 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 */ -#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ +#define D_SHAPER_DEBUG LOGLEV(10, 70, M_DEBUG) /* show traffic shaper info */ -#define D_REGISTRY LOGLEV(11, 70, M_DEBUG) /* win32 registry debugging 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 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..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 = 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) && defined(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,TUN Write Trunc,Pre-encrypt Trunc,Post-decrypt Trunc"); hash_iterator_init(m->hash, &hi); while ((he = 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 = ntlmv2_response + 16; /* inside ntlmv2_response, length: 128 */ int ntlmv2_blob_size = 0; - int phase3_bufpos = 0x40; /* offset to next security buffer data to be added */ + int phase3_bufpos = 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 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 doing any real work!\n"); + fprintf(stderr, "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/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 know 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 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(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 = 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 discovery options on socket */ + int mtu_discover_type; /* used if OS supports setting Path MTU 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 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 fragment; /* internal fragmentation size */ + bool fragment_encap; /* true if --fragment had the "mtu" 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 tell peer when we are exiting 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[] = { "block-ipv6", "block-outside-dns", - "dhcp-option", "dns", - "ifconfig", "ifconfig-ipv6", +static const char *updatable_options[] = { "block-ipv6", "block-outside-dns", + "dhcp-option", "dns", + "ifconfig", "ifconfig-ipv6", "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", + "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, route, netsh, etc.*/ -#define SSEC_SCRIPTS 2 /* allow calling of built-in programs and user-defined 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 receive a password + as an environmental variable */ +#define SSEC_PW_ENV 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_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 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; /* 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 */ + 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 packet 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/plugin, ccd,...) */ 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 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 @@ #define MAKE_DI(x) { NID_##x, x, sizeof(x) } + /* clang-format off */ DIG_INFO dinfo[] = { MAKE_DI(sha1), MAKE_DI(sha256), MAKE_DI(sha384), MAKE_DI(sha512), MAKE_DI(sha224), MAKE_DI(sha512_224), MAKE_DI(sha512_256), { 0, NULL, 0 } }; + /* clang-format on */ size_t out_len = 0; bool ret = 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 pDeviceInfoData, _Inout_ LPBOOL pbRebootRequired) { - SP_REMOVEDEVICE_PARAMS params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_REMOVE, }, @@ -281,10 +279,8 @@ change_device_state(_In_ HDEVINFO hDeviceInfoSet, _In_ PSP_DEVINFO_DATA pDeviceInfoData, _In_ BOOL bEnable, _Inout_ LPBOOL pbRebootRequired) { - SP_PROPCHANGE_PARAMS params = - { - .ClassInstallHeader = - { + SP_PROPCHANGE_PARAMS params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = DIF_PROPERTYCHANGE, }, @@ -768,10 +764,8 @@ if (dwResult != ERROR_SUCCESS) { /* The adapter was installed. But, the adapter ID was unobtainable. Clean-up. */ - SP_REMOVEDEVICE_PARAMS removedevice_params = - { - .ClassInstallHeader = - { + SP_REMOVEDEVICE_PARAMS removedevice_params = { + .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), .InstallFunction = 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] = 0x23; + (BPTR(&buf))[i] = 0x23; verdict = 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] = 0x23; + (BPTR(&buf))[20] = 0x23; verdict = tls_pre_decrypt_lite(&tas, &state, &from, &buf); assert_int_equal(verdict, VERDICT_INVALID); free_tls_pre_decrypt_state(&state); |
From: cron2 (C. Review) <ge...@op...> - 2025-08-05 13:27:00
|
Attention is currently required from: cron2, flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1129?usp=email ) Change subject: clang-format: Switch to ColumnLimit 0 ...................................................................... Patch Set 1: Code-Review+2 Copied votes on follow-up patch sets have been updated: * Code-Review+2 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE OR changekind:TRIVIAL_REBASE OR is:MIN"). -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1129?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: Ibd900adfc775b7f785f1d5630184a124f5d8ff4b Gerrit-Change-Number: 1129 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: cron2 <ge...@gr...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Tue, 05 Aug 2025 13:26:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-05 12:28:38
|
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/+/1130?usp=email to review the following change. Change subject: Add clang-format reformat commit to .git-blame-ignore-revs ...................................................................... Add clang-format reformat commit to .git-blame-ignore-revs Change-Id: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M .git-blame-ignore-revs 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1130/1 diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1fafaac..757d9ad 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -48,3 +48,6 @@ # Reformat for sp_after_comma=add e51d9a73693ee742b36e19fb1718e5e27167831d + +# The Great Reformatting of 2025, switching to clang-format +3cca3367e6e0ffeccb8e39cb2c739d1dcb086701 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1130?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: I729ee240e107a629ada5fab6b2ed2399e864cbd0 Gerrit-Change-Number: 1130 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newchange |