mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-06 13:51:29 +00:00
Don't set default gateway if one exists
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user