aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-01-05 22:44:56 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-05 22:44:56 -0500
commitd4253c6258912057b33190a113d490f295c93352 (patch)
treef00a55adcedfde95441ed2ec498a2a294623522e /include/linux/udp.h
parentnetlink: Warn on unordered or illegal nla_nest_cancel() or nlmsg_cancel() (diff)
parentip: Add offset parameter to ip_cmsg_recv (diff)
downloadlinux-dev-d4253c6258912057b33190a113d490f295c93352.tar.xz
linux-dev-d4253c6258912057b33190a113d490f295c93352.zip
Merge branch 'ip_cmsg_csum'
Tom Herbert says: ==================== ip: Support checksum returned in csmg This patch set allows the packet checksum for a datagram socket to be returned in csum data in recvmsg. This allows userspace to implement its own checksum over the data, for instance if an IP tunnel was be implemented in user space, the inner checksum could be validated. Changes in this patch set: - Move checksum conversion to inet_sock from udp_sock. This generalizes checksum conversion for use with other protocols. - Move IP cmsg constants to a header file and make processing of the flags more efficient in ip_cmsg_recv - Return checksum value in cmsg. This is specifically the unfolded 32 bit checksum of the full packet starting from the first byte returned in recvmsg Tested: Wrote a little server to get checksums in cmsg for UDP and verfied correct checksum is returned. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index ee3277593222..247cfdcc4b08 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -49,11 +49,7 @@ struct udp_sock {
unsigned int corkflag; /* Cork is required */
__u8 encap_type; /* Is this an Encapsulation socket? */
unsigned char no_check6_tx:1,/* Send zero UDP6 checksums on TX? */
- no_check6_rx:1,/* Allow zero UDP6 checksums on RX? */
- convert_csum:1;/* On receive, convert checksum
- * unnecessary to checksum complete
- * if possible.
- */
+ no_check6_rx:1;/* Allow zero UDP6 checksums on RX? */
/*
* Following member retains the information to create a UDP header
* when the socket is uncorked.
@@ -102,16 +98,6 @@ static inline bool udp_get_no_check6_rx(struct sock *sk)
return udp_sk(sk)->no_check6_rx;
}
-static inline void udp_set_convert_csum(struct sock *sk, bool val)
-{
- udp_sk(sk)->convert_csum = val;
-}
-
-static inline bool udp_get_convert_csum(struct sock *sk)
-{
- return udp_sk(sk)->convert_csum;
-}
-
#define udp_portaddr_for_each_entry(__sk, node, list) \
hlist_nulls_for_each_entry(__sk, node, list, __sk_common.skc_portaddr_node)