udp: add support for UDP_GRO cmsg

When UDP GRO is enabled, the UDP_GRO cmsg will carry the ingress
datagram size. User-space can use such info to compute the original
packets layout.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Paolo Abeni
2018-11-07 12:38:30 +01:00
committed by David S. Miller
parent e20cf8d3f1
commit bcd1665e35
3 changed files with 18 additions and 0 deletions

View File

@@ -417,6 +417,9 @@ try_again:
*addr_len = sizeof(*sin6);
}
if (udp_sk(sk)->gro_enabled)
udp_cmsg_recv(msg, sk, skb);
if (np->rxopt.all)
ip6_datagram_recv_common_ctl(sk, msg, skb);