Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac - DNS Search Domains Not Being Used When redirect_dns is true #242

Open
dmalloy54 opened this issue Sep 15, 2022 · 0 comments
Open

Mac - DNS Search Domains Not Being Used When redirect_dns is true #242

dmalloy54 opened this issue Sep 15, 2022 · 0 comments

Comments

@dmalloy54
Copy link

The configured search domains are never added to the array being used to actually configure them (as instantiated here):
https://github.com/OpenVPN/openvpn3/blob/master/openvpn/tun/mac/macdns.hpp#L173

I successfully tested out a fix by replacing the above line with newly created helper function:

CF::MutableArray search_domains(CF::mutable_array_from_array(config.search_domains));

And adding the helper to cf.hpp:

inline MutableArray mutable_array_from_array(Array array, const CFIndex capacity= 0)  
{ 
    return MutableArray(CFArrayCreateMutableCopy(kCFAllocatorDefault, capacity, array()));  
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant