From 33a6ea0c8788d5daf559eb817eacd18c0e863679 Mon Sep 17 00:00:00 2001 From: Rene Diepstraten Date: Tue, 7 Aug 2018 11:59:38 +0200 Subject: [PATCH] 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. --- systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py index 30fb38e016a..ecbc12f5a6f 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py @@ -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)