mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-12 02:52:30 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user