Hi,
On Thu, Jun 7, 2018 at 1:29 PM Antonio Quartulli <a...@unstable.cc> wrote:

> On 08/06/18 01:05, Selva Nair wrote:
> > Hi,
> >
> > On Thu, Jun 7, 2018 at 12:57 PM, Gert Doering <g...@greenie.muc.de>
> wrote:
> >> Hi,
> >>
> >> On Thu, Jun 07, 2018 at 12:14:51PM -0400, Selva Nair wrote:
> >>> Note: All that said, I can't seem to connect to the server via ipv6
> >>> when there is no v4 address. tracert fails before the first hop.
> >>> v6 does work when ifconfig is not filtered out.
> >>
> >> This "should not happen".
> >>
> >> v6 should work no matter what we break in v4 land.
> >>
> >> But this is windows, and "should work" land...
> >
> > It happens because the patch skips CONFIG_TUN ioctl when v4 address is
> > not set. I think that skips some initialization steps. I had expected
> > the patch to setup the driver using 0/0/0 as the addres/mask/net as we
> > discussed earlier. Fixing that should make the tap driver talk back to
> > us and v6 work.
>
> I have fixed that, but I have not been able to compile/test yet. Feel
> free to give it a shot.
>

It works now though not thoroghly tested.

I just noticed this change:

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 8509d48..d183aea 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -5718,7 +5718,10 @@ open_tun(const char *dev, const char *dev_type,
const char *dev_node, struct tun
             msg(M_FATAL, "ERROR: --dev tun also requires --ifconfig");
         }

-        if (tt->topology == TOP_SUBNET)
+        /* send 0/0/0 to the TAP driver even if we have no IPv4 configured
to
+         * ensure it is somehow initialized.
+         */
+        if (!tt->did_ifconfig_setup || tt->topology == TOP_SUBNET)
         {

This should work, but why change the logic? I would leave the conditionals
as in the original:

if (tt->topology == TOP_SUBNET) etc..

i.e call the CONFIG_TUN ioctl if topology is subnet else call
CONFIG_POINT_TO_POINT (eg., net30) irrsepective of v4 address is available
or not.  This separate handling of net30 and subnet in the orginal is due
to historic reasons[*]. That is already messy and confusing so why add to
it with another cryptic condition?

Just saying... feel free to ignore.

Selva

[*] Topology subnet uses ip, nework and netmask, while net30 passes in the
second IP of the /30 in network as "netmask". The two ioctls interprets
their parameters differently such that in the end only valid ARP packets
get a response from the driver !
------------------------------------------------------------------------------
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