提交 6f37c9f9 编写于 作者: F Florent Fourcot 提交者: David S. Miller

Revert "rtnetlink: return EINVAL when request cannot succeed"

This reverts commit b6177d32

ip-link command is testing kernel capability by sending a RTM_NEWLINK
request, without any argument. It accepts everything in reply, except
EOPNOTSUPP and EINVAL (functions iplink_have_newlink / accept_msg)

So we must keep compatiblity here, invalid empty message should not
return EINVAL
Signed-off-by: NFlorent Fourcot <florent.fourcot@wifirst.fr>
Tested-by: NGuillaume Nault <gnault@redhat.com>
Reviewed-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 59359597
......@@ -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 -EINVAL;
return -ENODEV;
}
if (tb[IFLA_MAP] || tb[IFLA_PROTINFO])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册