Hi,

On Thu, Sep 24, 2020 at 4:57 AM Lev Stipakov <lstipa...@gmail.com> wrote:

> Hi,
>
> > When there are no IPv6 DNS published, the adapter state is not
> > sanitized and might contain IPv6 DNS server from a previous session.
>
> In this case, shouldn't the "set dns" call below overwrite the previous
> value?


> > netsh_ifconfig_options() clears DNS servers for IPv4 already.
>
> Agreed, let's do it for consistency.
>
> >   * The list of dns servers currently set on the interface
> >   * are cleared first.
>
> Either existing comment lied or "implicit clear" was assumed because
> of the "set dns" call.
>

The clearing happened only if at least one DNS address was specified using
--dhcp-option DNS.


> But now it is fine, since we have real clearing.
>

Now that this has been merged, should we make DNS settings using iservice
consistent with this? Currently, when using the service, we do not touch
any existing dns servers if none are specified using --dhcp-option. Same
approach was taken in my patch for setting the domain suffix. The original
logic was that any statically set values should not be overwritten unless
explicitly asked for. At the same time, we do delete all addresses for v4
(not v6) while closing tun.

But, if we want to ensure a clean state for the adapter, as argued here, we
should be clearing current values regardless of whether new one's are being
set or not.

Selva


> Stared and the code, built and tested on MSVC/Win10.
>
> Acked-by: Lev Stipakov <lstipa...@gmail.com>
>
>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
>
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to