# Enable dnsmasq for this interface.
# It's possible that we could get by with a single instance of dnsmasq running on
# all devices but I haven't tried it.
-def start_dnsmasq(dev, interface):
+def start_dnsmasq(dev, interface, forward_dns=True):
if not dnsmasq_running(dev):
# The '--dhcp-range=<IP addr>,static' argument to dnsmasq ensures that it only
# hands out IP addresses to clients listed in the hostsfile
'--dhcp-no-override',
'--dhcp-range=%s,static' % interface['ip']]
+ # Turn off forwarding DNS queries, only do DHCP
+ if forward_dns == False:
+ cmd.append('--port=0')
+
try:
logger.log('%s: starting dnsmasq on device %s' % (plugin, dev))
subprocess.check_call(cmd)
if 'OVS_BRIDGE' in tags:
dev = tags['OVS_BRIDGE']
write_dnsmasq_hostsfile(dev, ports, site_net_id)
- start_dnsmasq(dev, interface)
+ start_dnsmasq(dev, interface, forward_dns=False)