diff options
author | Florent Fourcot <florent.fourcot@wifirst.fr> | 2022-04-19 14:51:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-22 11:02:00 +0100 |
commit | 6f37c9f9dfbf9a9645ec5ea2d9370b0fd3e9081e (patch) | |
tree | 246fb14390760c1f7c6293303a094054f6ce03c0 /net/core/rtnetlink.c | |
parent | 59359597b010ced20e6e14c8660834c05c2a96b7 (diff) | |
download | lwn-6f37c9f9dfbf9a9645ec5ea2d9370b0fd3e9081e.tar.gz lwn-6f37c9f9dfbf9a9645ec5ea2d9370b0fd3e9081e.zip |
Revert "rtnetlink: return EINVAL when request cannot succeed"
This reverts commit b6177d3240a4
ip-link command is testing kernel capability by sending a RTM_NEWLINK
request, without any argument. It accepts everything in reply, except
EOPNOTSUPP and EINVAL (functions iplink_have_newlink / accept_msg)
So we must keep compatiblity here, invalid empty message should not
return EINVAL
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Tested-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index b943336908a7..73f2cbc440c9 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3457,7 +3457,7 @@ replay: return rtnl_group_changelink(skb, net, nla_get_u32(tb[IFLA_GROUP]), ifm, extack, tb); - return -EINVAL; + return -ENODEV; } if (tb[IFLA_MAP] || tb[IFLA_PROTINFO]) |