2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-12 02:52:30 +00:00

Reorder SLP services

Make the most important one likely to be first, so that the
attributes filled out later to fixate on the most relevant.
This commit is contained in:
Jarrod Johnson
2017-06-28 16:13:45 -04:00
parent 3bcf236744
commit dc23793d32

View File

@@ -443,8 +443,15 @@ def snoop(handler):
# ignore for now
known_peers.discard(peer)
continue
# we want to prioritize the very well known services
svcs = []
for svc in q:
if svc in _slp_services:
svcs.insert(0, svc)
else:
svcs.append(svc)
peerbymacaddress[mac] = {
'services': q,
'services': svcs,
'addresses': [peer],
}
newmacs.add(mac)