Conversation
When running wireless backhaul tests, we have to remove the wired interface from the bridge to avoid creating a loop. Dynamic backhaul switching is not implemented yet, but we can get away with it in certification. When we receive dev_reset_default from the UCC, remove the wired interface from the bridge. Then, when we get dev_set_config, only add the wired interface back in the bridge if the test uses wired backhaul. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Previously the wireless hal was only disconnected in dev_reset if the FSM state was already is something that comes after ENABLE. There are some cases however where the disconnect didn't happen. For example, if the connection is active and we stop and restart prplMesh, the next dev_reset will not disconnect the wireless link. When we are in dev_reset, disconnect the wireless hal if it's active, regardless of the FSM state. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
mariomaz
left a comment
There was a problem hiding this comment.
Just one concern, but since I'm not sure if it's indeed a problem, I'll approve and invite you to check.
| // remove the wired interface from the bridge, it will be added on dev_set_config. | ||
| if (std::find(bridge_ifaces.begin(), bridge_ifaces.end(), eth_iface) != | ||
| bridge_ifaces.end()) { | ||
| if (!network_utils::linux_remove_iface_from_bridge(bridge, eth_iface)) { |
There was a problem hiding this comment.
Maybe I'm wrong, but this might not be enough.
During initialization, backhaul_manager_thread reads what interfaces are in the bridge with network_utils::linux_get_iface_list_from_bridge and then configures the transport process with configure_ieee1905_transport_interfaces. Here you are removing an interface from the bridge but you are not re-configuring the transport process so it'll be unaware of the change. The same happens when you add a new interface to the bridge.
To fix this problem correctly, I think we should be monitoring the bridge for changes and automatically reconfigure the transport process, just in case the bridge is modified from outside prplMesh
When running wireless backhaul tests, we have to remove the wired
interface from the bridge to avoid creating a loop.
Dynamic backhaul switching is not implemented yet, but we can get away
with it in certification.
When we receive dev_reset_default from the UCC, remove the wired
interface from the bridge. Then, when we get dev_set_config, only add
the wired interface back in the bridge if the test uses wired backhaul.
Also:
Previously the wireless hal was only disconnected in dev_reset if the
FSM state was already is something that comes after ENABLE.
There are some cases however where the disconnect didn't happen.
For example, if the connection is active and we stop and restart
prplMesh, the next dev_reset will not disconnect the wireless
link.
When we are in dev_reset, disconnect the wireless hal if it's active,
regardless of the FSM state.