Commit 029b6d14 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

Revert "net: core: maybe return -EEXIST in __dev_alloc_name"



This reverts commit d6f295e9; some userspace (in the case
we noticed it's wpa_supplicant), is relying on the current
error code to determine that a fixed name interface already
exists.

Reported-by: default avatarJouni Malinen <j@w1.fi>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42d779ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
	 * when the name is long and there isn't enough space left
	 * for the digits, or if all bits are used.
	 */
	return p ? -ENFILE : -EEXIST;
	return -ENFILE;
}

static int dev_alloc_name_ns(struct net *net,