Mac - DNS Search Domains Not Being Used When redirect_dns is true
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 467
- PR merge metrics
- No merged PRs in 30d
Description
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()));
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading openvpn/tun/mac/macdns.hpp around line 173 and the array wrappers in cf.hpp. Verify how configured search domains are passed when redirect_dns is true, then confirm that the fix preserves those domains in the macOS DNS configuration and that the project builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100