router: Use network based netmask for dnsmasq (#2792)

Without this patch, the VR uses the netmask of the primary network for all assigned cidrs.
This patch correctly applies the corresponding netmask.
This commit is contained in:
Rene Diepstraten 2018-08-07 11:59:38 +02:00 committed by Rohit Yadav
parent 4f49bf6770
commit 33a6ea0c87
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class CsDhcp(CsDataBag):
if self.config.is_vpc():
netmask = gn.get_netmask()
else:
netmask = self.config.address().get_guest_netmask()
netmask = str(i['network'].netmask)
sline = "dhcp-option=tag:interface-%s-%s,1," % (device, idx)
line = "dhcp-option=tag:interface-%s-%s,1,%s" % (device, idx, netmask)
self.conf.search(sline, line)