Hello,

ti 19. marrask. 2019 klo 9.37 Gert Doering (g...@greenie.muc.de) kirjoitti:

> Looks like this will most likely break any dhcp-related options
> > in the client config.. Say "dhcp-option DNS xxx".


Oops, indeed. When I add those to client config, I got:

> Options error: --dhcp-options requires --ip-win32 dynamic or adaptive


> We currently require ip_win32_type to be  adaptive or dynamic when such
> options are specified.
>

That limitation has been presented since the very first commit in github:

    if (options->tuntap_options.dhcp_options
        && options->tuntap_options.ip_win32_type != IPW32_SET_DHCP_MASQ
        && options->tuntap_options.ip_win32_type != IPW32_SET_ADAPTIVE)
    {
        msg(M_USAGE, "--dhcp-options requires --ip-win32 dynamic or
adaptive");
    }

I commented it out and client-side --dhcp-options worked for me. Any ideas
why we have this code?


> > I think we should set this to adaptive here, and then handle it in tun.c
>

Actually, in follow-up commit I have changed IPAPI to NETSH - if I remember
correctly
I could not set up routing using former, although it works when done by
iserv.

If we don't know why we have that check and we could apply dhcp options
from client config
without it, shouldn't we just get rid of it?


> >
> > Although there is no dhcp when wintun is used, we'll still support
> > dhcp-options such as DNS etc using netsh or service, right?
>

That's correct. At the moment we use:

 - netsh when running openvpn without interactive service
 - iserv, which itself uses both IPAPI (for setting up IP address and
routing) and netsh (for setting up DNS)

I had the same concerns, and if I remember right (I haven't looked just now)
> one of the later patches adds the missing bits to the iservice.
>

Yep, patch 6/7 https://patchwork.openvpn.net/patch/883/

-- 
-Lev
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to