Skip to content

Commit

Permalink
Revert "net: core: maybe return -EEXIST in __dev_alloc_name"
Browse files Browse the repository at this point in the history
This reverts commit d6f295e; 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: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
jmberg-intel authored and davem330 committed Dec 5, 2017
1 parent 42d779f commit 029b6d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 029b6d1

Please sign in to comment.