zerotier / zeronsd

A DNS server for ZeroTier users
https://zerotier.com
BSD 3-Clause "New" or "Revised" License
493 stars 57 forks source link

Fix using the host system config to create dns resolver #139

Closed keepwn closed 2 years ago

keepwn commented 2 years ago

As mentioned in the README, we should choose Resolver::from_system_conf() that using conf from/etc/resolv.conf not ResolverConfig::default() that using 8.8.8.8/8.8.4.4.

erikh commented 2 years ago

Hmm! I might have gotten this wrong; I'll review later this week when I go over the other outstanding patches.

erikh commented 2 years ago

Patch looks good; I took the liberty of moving your unwrap to a try (?) expression so it bubbles the error instead of crashing the program. I also rebased against recent main.

I'm running tests now, then will probably merge. Thanks for this!