mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 12:41:39 +00:00
Do not reply to mismatched IP in confluent search
If an OS queries for confluent, but will not have a viable address, avoid replying to let more usable network paths prevail. For example, one OS was coming up with 169.254 with no dhcp server, and being told it could do well to talk to 172.29, which obviously would not work.
This commit is contained in:
parent
674e2887f3
commit
1ec5231ebe
@ -202,6 +202,8 @@ def snoop(handler, byehandler=None, protocol=None, uuidlookup=None):
|
||||
cfg, node, ifidx=iface)
|
||||
if ncfg.get('matchesnodename', None):
|
||||
reply += 'DEFAULTNET: 1\r\n'
|
||||
elif not netutil.address_is_local(peer[0]):
|
||||
continue
|
||||
if not isinstance(reply, bytes):
|
||||
reply = reply.encode('utf8')
|
||||
s.sendto(reply, peer)
|
||||
|
Loading…
Reference in New Issue
Block a user