add normalize_uri instead of short_hostname
- use gethostbyaddr only in case of numeric IP - hard wired reverse CNAME (network alias) for linse-c
This commit is contained in:
3
secop.py
3
secop.py
@ -7,6 +7,7 @@ import logging
|
||||
from collections import namedtuple
|
||||
from select import select
|
||||
from streams import Stream, Base, StreamDead
|
||||
from normalizeuri import normalizeuri
|
||||
|
||||
IDN = re.compile('.*ISSE.*,SEC[oO]P,')
|
||||
DESCRIBING = re.compile(r'describing \S* (.*)$')
|
||||
@ -139,7 +140,7 @@ class UdpStream(Base):
|
||||
# msg['device'] = uri.split('://', 1)[-1].split(':')[0]
|
||||
kwargs = msg
|
||||
elif kind == 'node':
|
||||
uri = f"{addr}:{msg['port']}"
|
||||
uri = normalizeuri(f"{addr}:{msg['port']}")
|
||||
kwargs = {'name': msg['equipment_id']}
|
||||
else:
|
||||
continue
|
||||
|
Reference in New Issue
Block a user