mirror of
https://github.com/espressif/openthread.git
synced 2026-07-24 04:54:06 +00:00
[srp-server] notify advertising proxy of host/service expiration (#6248)
There is an issue that the SRP host or service are not deregistered by the Advertising Proxy when the host or service is expired. This is because we didn't notifies the Advertising Proxy of the host/service expiration. This commit fixes this issue and adds tests for it.
This commit is contained in:
@@ -2741,9 +2741,10 @@ class LinuxHost():
|
||||
#
|
||||
for line in self.bash(f'cat /tmp/{host_name}'):
|
||||
elements = line.split()
|
||||
if not elements or len(elements) < 6 or not elements[4].startswith(host_name):
|
||||
fullname = f'{host_name}.local.'
|
||||
if fullname not in elements:
|
||||
continue
|
||||
addresses.append(elements[5].split('%')[0])
|
||||
addresses.append(elements[elements.index(fullname) + 1].split('%')[0])
|
||||
|
||||
logging.debug(f'addresses of {host_name}: {addresses}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user