Skip to content

Commit

Permalink
Adding netmask to dnsmasq argument --dhcp-range
Browse files Browse the repository at this point in the history
By default, dnsmasq will try to guess the proper subnet size but
sometimes it will fail. This patch provides the network netmask
to dnsmasq via the --dhcp-range argument.

Fixes: bug #1154929

Change-Id: I74d62c837b5310004b9151851697e3ea3b475f92
(cherry picked from commit fb151b5)
  • Loading branch information
david-hill authored and vishvananda committed Mar 28, 2013
1 parent 50dece6 commit c85683e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nova/network/linux_net.py
Expand Up @@ -870,9 +870,10 @@ def restart_dhcp(context, dev, network_ref):
'--pid-file=%s' % _dhcp_file(dev, 'pid'),
'--listen-address=%s' % network_ref['dhcp_server'],
'--except-interface=lo',
'--dhcp-range=set:%s,%s,static,%ss' %
'--dhcp-range=set:%s,%s,static,%s,%ss' %
(network_ref['label'],
network_ref['dhcp_start'],
network_ref['netmask'],
FLAGS.dhcp_lease_time),
'--dhcp-lease-max=%s' % len(netaddr.IPNetwork(network_ref['cidr'])),
'--dhcp-hostsfile=%s' % _dhcp_file(dev, 'conf'),
Expand Down

0 comments on commit c85683e

Please sign in to comment.