diff options
author | Florent Fourcot <florent.fourcot@wifirst.fr> | 2022-04-15 19:53:30 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-04-19 14:38:55 +0300 |
commit | b6177d3240a4f58fe547891010ad77a45bc1c9ab (patch) | |
tree | 6f6db5473f8f7ad9031057056f2d0979b67ce96b | |
parent | dee04163e9f2feabb77615c630a1e31a91cc4449 (diff) | |
download | linux-b6177d3240a4f58fe547891010ad77a45bc1c9ab.tar.xz |
rtnetlink: return EINVAL when request cannot succeed
A request without interface name/interface index/interface group cannot
work. We should return EINVAL
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Brian Baboch <brian.baboch@wifirst.fr>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-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 73f2cbc440c9..b943336908a7 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 -ENODEV; + return -EINVAL; } if (tb[IFLA_MAP] || tb[IFLA_PROTINFO]) |