mirror of https://github.com/apache/cloudstack.git
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'
This commit is contained in:
parent
41b7eee2cb
commit
0db9c980a6
|
|
@ -89,9 +89,10 @@ class CsDhcp(CsDataBag):
|
|||
gateway = gn.get_gateway()
|
||||
else:
|
||||
gateway = i['gateway']
|
||||
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
|
||||
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
|
||||
self.conf.search(sline, line)
|
||||
if gateway != '0.0.0.0':
|
||||
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
|
||||
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
|
||||
self.conf.search(sline, line)
|
||||
# Netmask
|
||||
netmask = ''
|
||||
if self.config.is_vpc():
|
||||
|
|
|
|||
Loading…
Reference in New Issue