diff --git a/src/openvpn/options.c b/src/openvpn/options.c index ac1cc91352f5..49491b143f83 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2483,10 +2483,10 @@ options_postprocess_verify_ce(const struct options *options, if (options->tuntap_options.dhcp_options & DHCP_OPTIONS_DHCP_REQUIRED) { - const char *prefix = "Some dhcp-options require DHCP server"; + const char *prefix = "Some dhcp-options (or --dns) require DHCP server"; if (options->windows_driver != WINDOWS_DRIVER_TAP_WINDOWS6) { - msg(M_USAGE, "%s, which is not supported by selected %s driver", + msg(M_USAGE, "%s, which is not supported by the selected %s driver", prefix, print_windows_driver(options->windows_driver)); } else if (options->tuntap_options.ip_win32_type != IPW32_SET_DHCP_MASQ diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index f857ed18a13a..986134c46886 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -6826,6 +6826,13 @@ void open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tuntap *tt, openvpn_net_ctx_t *ctx) { + if ((tt->options.dhcp_options & DHCP_OPTIONS_DHCP_REQUIRED) + && tt->windows_driver != WINDOWS_DRIVER_TAP_WINDOWS6) + { + msg(M_WARN, "Some dhcp-options or --dns require DHCP server, which is not supported by the selected %s driver. Expect them not to work.", + print_windows_driver(tt->windows_driver)); + } + /* dco-win already opened the device, which handle we treat as socket */ if (tuntap_is_dco_win(tt)) {