1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Fixed using 169.254/16 as a valid IP for notifying to broker

This commit is contained in:
Adolfo Gómez García 2015-02-28 09:45:12 +01:00
parent 2d942fbac7
commit f751fff8ca
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)