Hi,

On Sun, Jan 1, 2017 at 8:35 AM, Gert Doering <g...@greenie.muc.de> wrote:

>
> Now, for this particular patch, I'm a bit undecided - it fixes breakage
> for people, but there's a warning about "unexpected side effects" so
> we might try to figure out why this warning exist.  Less options and
> doing the right thing by default is obviously good :-)



I do not see any bad side-effects mentioned in the man page. Essentially
what it says is --dhcp-renew is not necessary in most setups but may be
needed in some cases (e.g., media status set to always connected -- more on
that below).
And then it says the same "caveats" apply to --dhcp-release. But none of
what is mentioned is a caveat -- its only saying these options are usually
not needed.

However, --dhcp-release appears to be required and at least is a good
practice. We do remove addresses set using netsh or ipapi on disconnect. So
why not remove the one set by dhcp? What Trac #807 shows is that if release
is not called the adapter remembers the previous address and assigning the
same address to another adapter fails. In fact 807 is not just about dhcp,
even a statically assigned ip if left behind on an disconnected adapter
cannot be applied to another. Kind of obvious when stated that way.

On further testing, I've found a way to reproduce a similar behaviour as
Trac #807 even with a single adapter and multiple remotes (assigning
different VPN IPs). But only in a special case: the media status set to
"always connected" (tried on Win10 only). In this case, if there is an
address set on the adpater, Windows does not trigger a dhcp-renew when the
new connection is made  Logically, one would think the --dhcp-renew option
should help here, but for some reason it doesn't. However, dhcp release on
closing tun does fix it.  When there no IP set on the adapter, subsequent
connection does automatically trigger a dhcp renew and all goes well.

So if the bug reported in Trac 665 is related to media status = always
connected, this patch may fix that one too.

That said, the patch should also remove the option --dhcp-release and
associated documentation as it effectively makes release non-optional. I
can do a v2 if the patch is otherwise acceptable. In the mean time I've
added --dhcp-release to all my configs.

Selva
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to