Commit b6177d32 authored by Florent Fourcot's avatar Florent Fourcot Committed by Paolo Abeni

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: default avatarFlorent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: default avatarBrian Baboch <brian.baboch@wifirst.fr>
Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent dee04163
......@@ -3457,7 +3457,7 @@ static int __rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment