summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2018-09-11 17:48:09 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-09-11 16:06:11 -0400
commitcea8ca7c9c92f5cccc2dc4725d0e7de934f9c100 (patch)
tree0d8ffc084455e3584bbb69414f660422547d6b23
parent34355aa5acdd0f61ba07df96f9d32006d853693e (diff)
downloadmeta-virtualization-cea8ca7c9c92f5cccc2dc4725d0e7de934f9c100.tar.gz
lxc: Make named avoid listening on lxc network interface
lxc-net wants to take care of DNS itself using dnsmasq, while named in bind does the same thing on all network interfaces by default and causes the following error. dnsmasq: failed to create listening socket for 10.0.3.1: Address already in use Failed to setup lxc-net. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-core/bind/bind_%.bbappend1
-rw-r--r--recipes-core/bind/bind_virtualization.inc4
2 files changed, 5 insertions, 0 deletions
diff --git a/recipes-core/bind/bind_%.bbappend b/recipes-core/bind/bind_%.bbappend
new file mode 100644
index 00000000..617caccb
--- /dev/null
+++ b/recipes-core/bind/bind_%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/recipes-core/bind/bind_virtualization.inc b/recipes-core/bind/bind_virtualization.inc
new file mode 100644
index 00000000..b8f0b3ff
--- /dev/null
+++ b/recipes-core/bind/bind_virtualization.inc
@@ -0,0 +1,4 @@
1# Tell named not to bother listening on the IP address that lxc handles itself.
2do_install_append() {
3 sed -i -e 's,^\( *options *{\)$,\1\n\t// lxc would take care of this address itself\n\tlisten-on { ! 10.0.3.1; any;};\n,' ${D}${sysconfdir}/bind/named.conf.options
4}