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>
This commit is contained in:
He Zhe 2018-09-11 17:48:09 +08:00 committed by Bruce Ashfield
parent 34355aa5ac
commit cea8ca7c9c
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}

View File

@ -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
}