From b6177d3240a4f58fe547891010ad77a45bc1c9ab Mon Sep 17 00:00:00 2001 From: Florent Fourcot Date: Fri, 15 Apr 2022 18:53:30 +0200 Subject: 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 --- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/core/rtnetlink.c') 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]) -- cgit v1.2.3