]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
nicinfo: report real nameservers used when using systemd-resolved
authorOliver Kurth <okurth@vmware.com>
Wed, 11 Dec 2019 18:19:09 +0000 (10:19 -0800)
committerOliver Kurth <okurth@vmware.com>
Wed, 11 Dec 2019 18:19:09 +0000 (10:19 -0800)
commite6bc102b12eb346eb0c77feca50ff185994bbcab
treef0f7e8f67476389a13e3062eb6427180e4608226
parent93c2d3b8c943ab2ce5a3d75b1b02a51af6705f54
nicinfo: report real nameservers used when using systemd-resolved

If systemd-resolved is used, report the external DNS server, not the
locally installed one.  This is detected by checking if /etc/resolv.conf
is a link to /run/systemd/resolve/stub-resolv.conf.  In that case,
/run/systemd/resolve/resolv.conf will hold the actual DNS server.  See
https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html
open-vm-tools/lib/nicInfo/nicInfoPosix.c