commit d504b74c6182faff4328463476a6110886de4d40
parent 6957b5fdf047c83fbcd3cf28e225829955a69a48
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 17 Jan 2023 10:03:43 -0800
manager: handle -ENODEV special in interface callback
If IWD ends up dumping wiphy's twice (because of NEW_WIPHY event
soon after initial dump) it will also try and dump interfaces
twice leading to multiple DEL_INTERFACE calls. The second attempt
will fail with -ENODEV (since the interface was already deleted).
Just silently fail with this case and let the other DEL_INTERFACE
path handle the re-creation.
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/manager.c b/src/manager.c
@@ -320,13 +320,18 @@ static void manager_setup_cmd_done(void *user_data)
static void manager_del_interface_cb(struct l_genl_msg *msg, void *user_data)
{
struct wiphy_setup_state *state = user_data;
+ int err;
l_debug("");
if (state->aborted)
return;
- if (l_genl_msg_get_error(msg) < 0) {
+ err = l_genl_msg_get_error(msg);
+
+ if (err == -ENODEV)
+ return;
+ else if (err < 0) {
l_error("DEL_INTERFACE failed: %s",
strerror(-l_genl_msg_get_error(msg)));
state->use_default = true;