mirror of
https://github.com/espressif/openthread.git
synced 2026-08-03 09:27:47 +00:00
[thci] fix mdns_query (#7154)
Avoid parsing responses for not expected cases. Fixes some issues with Thread 1.2 certification test cases in which it's not required to parse the mDNS response.
This commit is contained in:
@@ -612,9 +612,12 @@ EOF"
|
||||
print('mdns_query %s %s %s' % (dst, service, addrs_blacklist))
|
||||
|
||||
result = self.bash('dig -p 5353 @%s %s ptr +time=2 +retry=2' % (dst, service))
|
||||
responses = ' '.join(result).split(';; ANSWER SECTION:')
|
||||
|
||||
if dst == 'ff02::fb' and not addrs_blacklist:
|
||||
return (0, '')
|
||||
|
||||
# Remove responses from unwanted devices
|
||||
responses = ' '.join(result).split(';; ANSWER SECTION:')
|
||||
for response in responses:
|
||||
if not set(response.split()).isdisjoint(set(addrs_blacklist)):
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user