aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorFlorent Fourcot <florent.fourcot@wifirst.fr>2022-04-15 18:53:30 +0200
committerPaolo Abeni <pabeni@redhat.com>2022-04-19 13:38:55 +0200
commitb6177d3240a4f58fe547891010ad77a45bc1c9ab (patch)
tree6f6db5473f8f7ad9031057056f2d0979b67ce96b /net/core/rtnetlink.c
parentrtnetlink: return ENODEV when IFLA_ALT_IFNAME is used in dellink (diff)
downloadlinux-dev-b6177d3240a4f58fe547891010ad77a45bc1c9ab.tar.xz
linux-dev-b6177d3240a4f58fe547891010ad77a45bc1c9ab.zip
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>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c2
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])