mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 05:37:46 +00:00
[dua] handle AddressError (#5516)
This commit enhances DUA feature to handle Address Error by increasing the DAD counter and generating new DUA address if a DUA conflict is detected.
This commit is contained in:
@@ -959,6 +959,16 @@ class NodeImpl:
|
||||
self.send_command('routerdowngradethreshold')
|
||||
return int(self._expect_result(r'\d+'))
|
||||
|
||||
def set_router_eligible(self, enable: bool):
|
||||
cmd = f'routereligible {"enable" if enable else "disable"}'
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
def get_router_eligible(self) -> bool:
|
||||
states = [r'Disabled', r'Enabled']
|
||||
self.send_command('routereligible')
|
||||
return self._expect_result(states) == 'Enabled'
|
||||
|
||||
def prefer_router_id(self, router_id):
|
||||
cmd = 'preferrouterid %d' % router_id
|
||||
self.send_command(cmd)
|
||||
@@ -1007,6 +1017,11 @@ class NodeImpl:
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
def del_ipaddr(self, ipaddr):
|
||||
cmd = 'ipaddr del %s' % ipaddr
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
def add_ipmaddr(self, ipmaddr):
|
||||
cmd = 'ipmaddr add %s' % ipmaddr
|
||||
self.send_command(cmd)
|
||||
|
||||
Reference in New Issue
Block a user