Override the fallbackDNS property
- fallbackDNS is a space-separated list of IPv4 and IPv6
addresses to use as the fallback DNS servers. Any per-link
DNS servers obtained from systemd-networkd.service take
precedence over this setting, as do any servers set via
DNS= above or /etc/resolv.conf.
- This setting is hence only used if no other DNS server
information is known. If this option is not given, a
compiled-in list of DNS servers is used instead.
- The default compiled list of DNS for systemd-resolved are
['1.1.1.1', '8.8.8.8', '1.0.0.1', '8.8.4.4',
'2606:4700:4700::1111','2001:4860:4860::8888',
'2606:4700:4700::1001', '2001:4860:4860::8844']
which are google DNS servers.
- The problem with this is that, when there is no DNS configuration
on BMC(or the customer removes it),resovld would still used the
precompiled compiled list of google DNS for quires without the
user knowledge(security issue)
- This commit would override the fallbackDNS to NULL
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ibbc54bead1941436b09a2555f3b7aefcd552ee0d
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index de1aa2e..16ba8f7 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -9,6 +9,7 @@
SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch"
FILES_${PN} += "${systemd_unitdir}/network/default.network"
+EXTRA_OEMESON += "-Ddns-servers=''"
do_install_append() {
install -m 644 ${WORKDIR}/default.network ${D}${systemd_unitdir}/network/