Hi,
Sorry for not mentioning it earlier.
There is already check in forward.c:
if (tuntap_defined(c->c1.tuntap))
{
tun_show_debug(c->c1.tuntap);
}
Same goes for tap_win_getinfo in sig.c:
if (tuntap_defined(c->c1.tuntap))
{
status_printf(so, "TAP-WIN32 driver status,\"%s\"",
tap_win_getinfo(c->c1.tuntap, &gc));
}
There is one place where that check is missing, error.c:
#elif defined(_WIN32)
/* get possible driver error from TAP-Windows driver */
extended_msg = tap_win_getinfo(tt, &gc);
#endif
There is no need to call tuntap_defined() twice, so either
we remove it from calling code or from tun_* methods.
For the sake of consistency I propose to add it to error.c
and remove from tun_* methods, which would just check for !tt->wintun.
--
-Lev
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel