mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-30 19:02:29 +00:00 
			
		
		
		
	Skip peer probe on remote
When remote ip is detected, communicate by returning False instead of None. Use this indication to let ssdp skip a transmit and growing pending list in such a case.
This commit is contained in:
		| @@ -189,6 +189,10 @@ def snoop(handler, byehandler=None, protocol=None, uuidlookup=None): | ||||
|                             continue | ||||
|                         recent_peers.add(peer) | ||||
|                         mac = neighutil.get_hwaddr(peer[0]) | ||||
|                         if mac == False: | ||||
|                             # neighutil determined peer ip is not local, skip attempt | ||||
|                             # to probe and critically, skip growing deferrednotifiers | ||||
|                             continue | ||||
|                         if not mac: | ||||
|                             probepeer = (peer[0], struct.unpack('H', os.urandom(2))[0] | 1025) + peer[2:] | ||||
|                             try: | ||||
|   | ||||
| @@ -97,7 +97,9 @@ def get_hwaddr(ipaddr): | ||||
|             _update_neigh() | ||||
|             updated = True | ||||
|         hwaddr = neightable.get(ipaddr, None) | ||||
|         if not hwaddr and not updated and netutil.ip_is_local(ipaddr): | ||||
|         if not hwaddr and not netutil.ip_is_local(ipaddr): | ||||
|             hwaddr = False | ||||
|         if hwaddr == None and not updated: | ||||
|             _update_neigh() | ||||
|             hwaddr = neightable.get(ipaddr, None) | ||||
|     if hwaddr: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user