diff options
author | He Zhe <zhe.he@windriver.com> | 2018-09-11 17:48:09 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-09-11 16:06:11 -0400 |
commit | cea8ca7c9c92f5cccc2dc4725d0e7de934f9c100 (patch) | |
tree | 0d8ffc084455e3584bbb69414f660422547d6b23 | |
parent | 34355aa5acdd0f61ba07df96f9d32006d853693e (diff) | |
download | meta-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_%.bbappend | 1 | ||||
-rw-r--r-- | recipes-core/bind/bind_virtualization.inc | 4 |
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. | ||
2 | do_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 | } | ||