mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
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.
This commit is contained in:
parent
6957b5fdf0
commit
d504b74c61
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user