Skip to content

Conversation

@rlubos
Copy link
Contributor

@rlubos rlubos commented May 15, 2025

Connection manager enforces non-blocking disconnect() behavior, yet in case CONN_MGR_IF_NO_AUTO_DOWN flag is not set, it'd put the interface down right after, disrupting the disconnect process.

As putting the interface down can be handled in the corresponding event handler as well, when the interface is actually disconnected, remove the conn_mgr_conn_if_auto_admin_down() call from conn_mgr_if_disconnect(). To make this work with persistence flag, introduce a new internal flag indicating that the interface is in active disconnect.

Finally, since it isn't really necessary that disconnect() API call is non-blocking, remove that requirement.

Fixes #89802

Connection manager enforces non-blocking disconnect() behavior, yet in
case CONN_MGR_IF_NO_AUTO_DOWN flag is not set, it'd put the interface
down right after, disrupting the disconnect process.

As putting the interface down can be handled in the corresponding event
handler as well, when the interface is actually disconnected, remove the
conn_mgr_conn_if_auto_admin_down() call from conn_mgr_if_disconnect().
To make this work with persistence flag, introduce a new internal flag
indicating that the interface is in active disconnect.

Finally, since it isn't really necessary that disconnect() API call is
non-blocking, remove that requirement.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
@rlubos rlubos requested a review from JordanYates May 15, 2025 12:32
@sonarqubecloud
Copy link

@kartben kartben merged commit 011f2bc into zephyrproject-rtos:main May 19, 2025
28 checks passed
@rlubos rlubos deleted the net/conn-mgr-disconnect-fixes branch May 19, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net: connectivity manager: iface taken down before disconnect actioned

4 participants