summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2015-01-05 22:56:17 +0100
committerDavid S. Miller <davem@davemloft.net>2015-01-06 04:44:46 +0100
commitad6f939ab193750cc94a265f58e007fb598c97b7 (patch)
treef00a55adcedfde95441ed2ec498a2a294623522e /net/ipv4/udp.c
parentip: Add offset parameter to ip_cmsg_recv (diff)
downloadlinux-ad6f939ab193750cc94a265f58e007fb598c97b7.tar.xz
linux-ad6f939ab193750cc94a265f58e007fb598c97b7.zip
ip: Add offset parameter to ip_cmsg_recv
Add ip_cmsg_recv_offset function which takes an offset argument that indicates the starting offset in skb where data is being received from. This will be useful in the case of UDP and provided checksum to user space. ip_cmsg_recv is an inline call to ip_cmsg_recv_offset with offset of zero. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 53358d88f110..97ef1f8b7be8 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1329,7 +1329,7 @@ try_again:
*addr_len = sizeof(*sin);
}
if (inet->cmsg_flags)
- ip_cmsg_recv(msg, skb);
+ ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr));
err = copied;
if (flags & MSG_TRUNC)