Skip to content

Commit abd52cc

Browse files
DaanHooglandrohityadavcloud
authored andcommitted
ignore bogus default gateway when a shared network is secondary the default gateway gets overwritten by a bogus one dnsmasq does the right thing and replaces it with its own default which is not good for us so check for '0.0.0.0'
1 parent 2b31107 commit abd52cc

File tree

1 file changed

+4
-3
lines changed
  • systemvm/patches/debian/config/opt/cloud/bin/cs

1 file changed

+4
-3
lines changed

systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ def configure_server(self):
8989
gateway = gn.get_gateway()
9090
else:
9191
gateway = i['gateway']
92-
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
93-
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
94-
self.conf.search(sline, line)
92+
if gateway != '0.0.0.0':
93+
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
94+
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
95+
self.conf.search(sline, line)
9596
# Netmask
9697
netmask = ''
9798
if self.config.is_vpc():

0 commit comments

Comments
 (0)