Message-ID: Date: Mon, 27 Jun 2022 13:32:51 +0200 MIME-Version: 1.0 Content-Language: en-GB References: <20220624083809.23487-1-a@...2181...> <20220624083809.23487-9-a@...2181...> From: Arne Schwabe In-Reply-To: <20220624083809.23487-9-a@...2181...> Subject: Re: [Openvpn-devel] [PATCH 08/25] dco: allow user to disable it at runtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Antonio Quartulli , openvpn-devel@lists.sourceforge.net Am 24.06.22 um 10:37 schrieb Antonio Quartulli: > Signed-off-by: Antonio Quartulli > --- > src/openvpn/options.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/src/openvpn/options.c b/src/openvpn/options.c > index 9a0634a5..7b450296 100644 > --- a/src/openvpn/options.c > +++ b/src/openvpn/options.c > @@ -61,6 +61,7 @@ > #include "ssl_verify.h" > #include "platform.h" > #include "xkey_common.h" > +#include "dco.h" > #include > > #include "memdbg.h" > @@ -106,6 +107,9 @@ const char title_string[] = > #endif > #endif > " [AEAD]" > +#ifdef ENABLE_DCO > + " [DCO]" > +#endif > " built on " __DATE__ > ; > > @@ -177,6 +181,9 @@ static const char usage_message[] = > " does not begin with \"tun\" or \"tap\".\n" > "--dev-node node : Explicitly set the device node rather than using\n" > " /dev/net/tun, /dev/tun, /dev/tap, etc.\n" > +#if defined(ENABLE_DCO) && defined(TARGET_LINUX) > + "--disable-dco : Do not attempt using Data Channel Offload.\n" > +#endif > "--lladdr hw : Set the link layer address of the tap device.\n" > "--topology t : Set --dev tun topology: 'net30', 'p2p', or 'subnet'.\n" > #ifdef ENABLE_IPROUTE > @@ -1711,6 +1718,9 @@ show_settings(const struct options *o) > SHOW_STR(dev); > SHOW_STR(dev_type); > SHOW_STR(dev_node); > +#if defined(ENABLE_DCO) && defined(TARGET_LINUX) > + SHOW_BOOL(tuntap_options.disable_dco); > +#endif > SHOW_STR(lladdr); > SHOW_INT(topology); > SHOW_STR(ifconfig_local); > @@ -3210,6 +3220,14 @@ options_postprocess_verify(const struct options *o) > } > > dns_options_verify(M_FATAL, &o->dns_options); > + > + if (dco_enabled(o) && o->enable_c2c) > + { > + msg(M_WARN, "Note: --client-to-client has no effect when using data " > + "channel offload: packets are always sent to the VPN " > + "interface and then routed based on the system routing " > + "table"); > + } You should add at least one of them to the man page and document it. Arne