Don't set default gateway if one exists

This commit is contained in:
Stephen A. Zarkos
2016-04-27 17:19:21 -07:00
parent 459cec7c44
commit cbdcd3ebc3
+6 -1
View File
@@ -6107,8 +6107,13 @@ class Agent(Util):
gateway = self.UnpackBigEndian(receiveBuffer, i + 2, 4)
IpAddress = self.IntegerToIpAddressV4String(gateway)
if option == 3:
self.SetDefaultGateway(gateway)
name = "DefaultGateway"
try:
defaultgw = FindStringInFile('/proc/net/route', 'eth\d[\s]+00000000')
if not defaultgw:
self.SetDefaultGateway(gateway)
except:
pass
else:
endpoint = IpAddress
name = "Azure wire protocol endpoint"