From f751fff8caa4ff64a0097aac5ce3a2d515fd660a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Sat, 28 Feb 2015 09:45:12 +0100 Subject: [PATCH] Fixed using 169.254/16 as a valid IP for notifying to broker --- actors/src/udsactor/service.py | 2 +- actors/src/udsactor/windows/operations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actors/src/udsactor/service.py b/actors/src/udsactor/service.py index 3fc1b5e3f..e11409b22 100644 --- a/actors/src/udsactor/service.py +++ b/actors/src/udsactor/service.py @@ -108,7 +108,7 @@ class CommonService(object): ids = ','.join([i.mac for i in netInfo]) if ids == '': # Wait for any network interface to be ready - logger.debug('No network interfaces found, retrying in a while...') + logger.debug('No valid network interfaces found, retrying in a while...') raise Exception() logger.debug('Ids: {}'.format(ids)) self.api.init(ids) diff --git a/actors/src/udsactor/windows/operations.py b/actors/src/udsactor/windows/operations.py index b2ab6d2bb..8701a22a4 100644 --- a/actors/src/udsactor/windows/operations.py +++ b/actors/src/udsactor/windows/operations.py @@ -62,7 +62,7 @@ def getNetworkInfo(): for ip in obj.IPAddress: if ':' in ip: # Is IPV6, skip this continue - if ip == '' or ip is None: + if ip is None or ip == '' or ip.startswith('169.254') or ip.startswith('0.'): # If single link ip, or no ip continue # logger.debug('Net config found: {}=({}, {})'.format(obj.Caption, obj.MACAddress, ip)) yield utils.Bunch(name=obj.Caption, mac=obj.MACAddress, ip=ip)