From: Florent Fourcot Date: Fri, 15 Apr 2022 16:53:30 +0000 (+0200) Subject: rtnetlink: return EINVAL when request cannot succeed X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b6177d3240a4f58fe547891010ad77a45bc1c9ab;p=linux.git 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 Signed-off-by: Brian Baboch Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 73f2cbc440c9b..b943336908a7d 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])