Message ID | 20220505161946.2867638-1-eric.dumazet@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d5076fe4049cadef1f040eda4aaa001bb5424225 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] netlink: do not reset transport header in netlink_recvmsg() | expand |
On Thu, 5 May 2022 09:19:46 -0700 Eric Dumazet wrote: > From: Eric Dumazet <edumazet@google.com> > > netlink_recvmsg() does not need to change transport header. > > If transport header was needed, it should have been reset > by the producer (netlink_dump()), not the consumer(s). Should I insert a reference to commit 99c07327ae11 ("netlink: reset network and mac headers in netlink_dump()") when applying to give backporters an extra hint?
On Thu, May 5, 2022 at 9:57 AM Jakub Kicinski <kuba@kernel.org> wrote: > > On Thu, 5 May 2022 09:19:46 -0700 Eric Dumazet wrote: > > From: Eric Dumazet <edumazet@google.com> > > > > netlink_recvmsg() does not need to change transport header. > > > > If transport header was needed, it should have been reset > > by the producer (netlink_dump()), not the consumer(s). > > Should I insert a reference to commit 99c07327ae11 ("netlink: reset > network and mac headers in netlink_dump()") when applying to give > backporters an extra hint? I thought about that, but CBPF has no business with transport header. I felt this would confuse things.
Hello: This patch was applied to netdev/net.git (master) by Jakub Kicinski <kuba@kernel.org>: On Thu, 5 May 2022 09:19:46 -0700 you wrote: > From: Eric Dumazet <edumazet@google.com> > > netlink_recvmsg() does not need to change transport header. > > If transport header was needed, it should have been reset > by the producer (netlink_dump()), not the consumer(s). > > [...] Here is the summary with links: - [net] netlink: do not reset transport header in netlink_recvmsg() https://git.kernel.org/netdev/net/c/d5076fe4049c You are awesome, thank you!
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 05a3795eac8e9a7c8343460d9a41e0755a64c36e..73e9c0a9c187674cced15dbec079734489c3329f 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1975,7 +1975,6 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, copied = len; } - skb_reset_transport_header(data_skb); err = skb_copy_datagram_msg(data_skb, 0, msg, copied); if (msg->msg_name) {