[srp-client] exclude non-preferred addresses in AutoAddress mode (#9642)

This commit updates the `AutoAddress` mode in `Srp::Client` to
exclude any deprecated (non-preferred) address when registering
host addresses.

It also updates `test_srp_auto_host_address` to validate the new
behavior.
This commit is contained in:
Abtin Keshavarzian
2023-11-29 15:52:12 -08:00
committed by GitHub
parent 63424e2f0c
commit 85660ce756
7 changed files with 39 additions and 22 deletions
+2 -2
View File
@@ -1880,8 +1880,8 @@ class NodeImpl:
self.send_command(cmd)
self._expect_done()
def get_addrs(self):
self.send_command('ipaddr')
def get_addrs(self, verbose=False):
self.send_command('ipaddr' + (' -v' if verbose else ''))
return self._expect_results(r'\S+(:\S*)+')