Hi,
On Fri, Sep 09, 2022 at 05:45:46PM +0300, Lev Stipakov wrote:
> +#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(_WIN32)
> if (dco_enabled(o))
> {
> - dco_check_option(M_USAGE, o);
> - dco_check_startup_option(M_USAGE, o);
> + /* check if any option should force disabling DCO */
> + o->tuntap_options.disable_dco = !dco_check_option(D_DCO, o)
> + || !dco_check_startup_option(D_DCO,
> o);
> + }
> + else
> + {
> + o->tuntap_options.disable_dco = true;
> + }
This is a bit weird. With the latest change, dco_enabled(o) will
only check tuntap_options.disable_dco - so, if that is false, disable_dco
is already true, so why set it in the "else" branch again?
> +#endif
> +
> +#ifdef _WIN32
> + if (!o->tuntap_options.disable_dco)
... and why reference the variable directly here, instead of querying
dco_enabled(o)?
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
