Commit 6f37c9f9 authored by Florent Fourcot's avatar Florent Fourcot Committed by David S. Miller
Browse files

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: default avatarFlorent Fourcot <florent.fourcot@wifirst.fr>
Tested-by: default avatarGuillaume Nault <gnault@redhat.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59359597
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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])