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:

committed by
David S. Miller

parent
e20cf8d3f1
commit
bcd1665e35
@@ -1711,6 +1711,10 @@ try_again:
|
||||
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
|
||||
*addr_len = sizeof(*sin);
|
||||
}
|
||||
|
||||
if (udp_sk(sk)->gro_enabled)
|
||||
udp_cmsg_recv(msg, sk, skb);
|
||||
|
||||
if (inet->cmsg_flags)
|
||||
ip_cmsg_recv_offset(msg, sk, skb, sizeof(struct udphdr), off);
|
||||
|
||||
|
Reference in New Issue
Block a user