From cea8ca7c9c92f5cccc2dc4725d0e7de934f9c100 Mon Sep 17 00:00:00 2001 From: He Zhe Date: Tue, 11 Sep 2018 17:48:09 +0800 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-core/bind/bind_%.bbappend | 1 + recipes-core/bind/bind_virtualization.inc | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 recipes-core/bind/bind_%.bbappend create mode 100644 recipes-core/bind/bind_virtualization.inc 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 @@ +# Tell named not to bother listening on the IP address that lxc handles itself. +do_install_append() { + 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 +} -- cgit v1.2.3-54-g00ecf