mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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()
|
gateway = gn.get_gateway()
|
||||||
else:
|
else:
|
||||||
gateway = i['gateway']
|
gateway = i['gateway']
|
||||||
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
|
if gateway != '0.0.0.0':
|
||||||
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
|
sline = "dhcp-option=tag:interface-%s-%s,3," % (device, idx)
|
||||||
self.conf.search(sline, line)
|
line = "dhcp-option=tag:interface-%s-%s,3,%s" % (device, idx, gateway)
|
||||||
|
self.conf.search(sline, line)
|
||||||
# Netmask
|
# Netmask
|
||||||
netmask = ''
|
netmask = ''
|
||||||
if self.config.is_vpc():
|
if self.config.is_vpc():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user