Hi,
On 08/06/18 09:00, Selva Nair wrote:
> 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.Well, topology is relevant only for IPv4, therefore when no --ifconfig is passed topology is basically ignored. For this reason I thought it would make sense to make the codeflow in this function explicit instead of relying of the topology value we actually have. Does it make sense? > > 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 ! Is ARP still to be considered when no IPv4 is configured? -- Antonio Quartulli
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
