mirror of
https://github.com/espressif/openthread.git
synced 2026-09-20 16:07:36 +00:00
[posix] handle dynamic infra if status (#6186)
This commit includes below changes: - handles dynamic infrastructure interface status changes. The Routing Manager will be started if the infra interface status turns to be RUNNING and a valid link-local address is present. Otherwise, the Routing Manager will be stopped. - changes the default status of the Routing Manager from enabled to disabled and it is initially enabled for the posix platform. - the posix implementation now doesn't require the presence of the link-local address at initialization stage. In this case, the Routing Manager will not be started before a link-local address is added to the infra interface. - add CI tests for the new behavior.
This commit is contained in:
@@ -2592,6 +2592,18 @@ class LinuxHost():
|
||||
PING_RESPONSE_PATTERN = re.compile(r'\d+ bytes from .*:.*')
|
||||
ETH_DEV = config.BACKBONE_IFNAME
|
||||
|
||||
def enable_ether(self):
|
||||
"""Enable the ethernet interface.
|
||||
"""
|
||||
|
||||
self.bash(f'ifconfig {self.ETH_DEV} up')
|
||||
|
||||
def disable_ether(self):
|
||||
"""Disable the ethernet interface.
|
||||
"""
|
||||
|
||||
self.bash(f'ifconfig {self.ETH_DEV} down')
|
||||
|
||||
def get_ether_addrs(self):
|
||||
output = self.bash(f'ip -6 addr list dev {self.ETH_DEV}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user