]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
upstart: Don't forward requests for LXC_DOMAIN
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 26 Feb 2014 00:15:28 +0000 (19:15 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 26 Feb 2014 00:15:28 +0000 (19:15 -0500)
Without this change, a request to *.LXC_DOMAIN that doesn't get a local
result from dnsmasq will be forwarded to its upstream server with the
potential of a loop.

Thanks to Ed for the patch on Launchpad (LP: #1246094).

Reported-by: Ed Swierk
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
config/init/upstart/lxc-net.conf

index 17538bb60c5e6134af85094e75a24b057b88b0e1..279cd1eebe09a7833b14d93e4cef777d7c5cd901 100644 (file)
@@ -60,7 +60,7 @@ pre-start script
 
        LXC_DOMAIN_ARG=""
        if [ -n "$LXC_DOMAIN" ]; then
-               LXC_DOMAIN_ARG="-s $LXC_DOMAIN"
+               LXC_DOMAIN_ARG="-s $LXC_DOMAIN -S /$LXC_DOMAIN/"
        fi
        dnsmasq $LXC_DOMAIN_ARG -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=${varrun}/dnsmasq.pid --conf-file=${LXC_DHCP_CONFILE} --listen-address ${LXC_ADDR} --dhcp-range ${LXC_DHCP_RANGE} --dhcp-lease-max=${LXC_DHCP_MAX} --dhcp-no-override --except-interface=lo --interface=${LXC_BRIDGE} --dhcp-leasefile=/var/lib/misc/dnsmasq.${LXC_BRIDGE}.leases --dhcp-authoritative || cleanup
        touch ${varrun}/network_up