On 25/04/17 22:40, ValdikSS wrote: > Please check updated version > https://github.com/ValdikSS/openvpn-with-patches/commit/80345eac823326299c5428a8db45dc06a8d10f7b > > set_interface_metric() needs to be called from interactive service but > the service doesn't include win32.h/c so I had to copy/paste code into > it. How could this be improved?
I've quickly looked at it. I am by far no Windows developer, so I don't understand all the deeper contexts of the details. But I've left a few comments on github with some questions I think could help clarify your patch. Adding a few comment lines of "why" and documentation pointers on some of these details you set as "default" would help understand the code better. What your or we know as a fact today, doesn't mean we will remember that and correlate it with today's context in a few years. -- kind regards, David Sommerseth OpenVPN Technologies, Inc > On 18.04.2017 21:42, ValdikSS wrote: >> On 18.04.2017 21:37, Selva Nair wrote: >>> >>> On Sat, Apr 15, 2017 at 6:41 PM, ValdikSS <valdi...@gmail.com >>> <mailto:valdi...@gmail.com>> wrote: >>> >>> How does this registry entry tell Windows that TAP adapter should be >>> preferred for DNS? Or is this to be done in addition to setting up a >>> preferred ordering of network adapters? >> >> It doesn't. I just remembered that option and set it. It worked for me >> when DNS is in the same subnet with user, but it fails if DNS is in >> the internet. >> Setting lower metric to the TAP interface correctly works in both >> cases, without reg patch. >> >>> >>> Can WFP be used to rewrite the source address? In that case we could >>> just redirect all DNS requests through the TAP interface instead of >>> dropping packets. >> >> Unfortunately not, not without kernel driver. >> >>> As for local ipv6 DNS servers, I do not think we should do anything >>> about it unless the tunnel can handle v6 traffic. >>> >>> Selva >> >> I made a perliminary patch to set interface metric to 7: >> https://github.com/ValdikSS/openvpn-with-patches/commit/0651c0469038dd0ba39329f4b83ecd7e1d04323e >> >> This is static change for the interface. Currently this patch does not >> revert previous metric value if there were any or set it back to >> automatic. Should it be implemented in your opinion? It still won't >> revert this value back in case of OpenVPN crash or power outage. Yet I >> don't think that lower metric on TAP interface would have any >> influence for networking at all. >> >> Please tell your opinion guys. Selva said it should revert the >> previous value upon termination. >> > > > > ------------------------------------------------------------------------------ > 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 >
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 Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel