]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Don't ignore when SET_KEY returns ENOENT
authorAlexander Wetzel <alexander@wetzel-home.de>
Wed, 4 Mar 2020 17:16:55 +0000 (18:16 +0100)
committerJouni Malinen <j@w1.fi>
Wed, 4 Mar 2020 22:38:30 +0000 (00:38 +0200)
Always report an error when NL80211_CMD_SET_KEY can't set a key to
default.

The old ioctl-based design used a single command to add, set, and delete
a key and had to ignore ENOENT for key deletions. It looks like that
special handling was also ported for NL80211_CMD_NEW_KEY and
NL80211_CMD_SET_KEY instead only for NL80211_CMD_DEL_KEY.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
src/drivers/driver_nl80211.c

index 94c56d0075a1959aaa260f286158115241980b1b..8b0e76f13c38ba2c4b993c38f115f52e22707bf0 100644 (file)
@@ -3225,8 +3225,6 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
        }
 
        ret = send_and_recv_msgs(drv, msg, NULL, NULL);
-       if (ret == -ENOENT)
-               ret = 0;
        if (ret)
                wpa_printf(MSG_DEBUG,
                           "nl80211: set_key default failed; err=%d %s",