Request: DNS information to network block
I'd like to have DNS information available in the net block. Is this feasible?
There are several ways that dns can be setup, but starting off with reading /etc/resolv.conf is a good start. Some dns resolves like systemd-resolved will put an entry like nameserver 127.0.0.53 and then do the resolution itself, although you can query to see which nameservers systemd-resolved is using.
Some dns resolves like
systemd-resolvedwill put an entry likenameserver 127.0.0.53
NetworkManager also does that.
Hi, is this a good first issue to start? Because if it is I would love to start working on it with only Rust!!
Sure, we can start of just reading /etc/resolv.conf looking for nameserver entries. Later we can add in an option to pick if another resolver should be queried.
Added a PR #2058 looking at nameserver entries in /etc/resolv.conf.
@bim9262 should this issue continue open to support other cases than resolved.conf? Like systemd-resolved and NetworkManager?
Yes, good catch. It was just partially completed by #2058