summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/compute/linux_net.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/compute/linux_net.py b/nova/compute/linux_net.py
index 861ce779b..4a4b4c8a8 100644
--- a/nova/compute/linux_net.py
+++ b/nova/compute/linux_net.py
@@ -94,7 +94,7 @@ def bridge_create(net):
execute("sudo ifconfig %s up" % net['bridge_name'])
def dnsmasq_cmd(net):
- cmd = ['sudo dnsmasq',
+ cmd = ['sudo -E dnsmasq',
' --strict-order',
' --bind-interfaces',
' --conf-file=',
@@ -143,8 +143,9 @@ def start_dnsmasq(network):
if os.path.exists(lease_file):
os.unlink(lease_file)
- # FLAGFILE in env
- env = {'FLAGFILE' : FLAGS.dhcpbridge_flagfile}
+ # FLAGFILE and DNSMASQ_INTERFACE in env
+ env = {'FLAGFILE': FLAGS.dhcpbridge_flagfile,
+ 'DNSMASQ_INTERFACE': network['bridge_name']}
execute(dnsmasq_cmd(network), addl_env=env)
def stop_dnsmasq(network):