summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-23 08:47:19 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-23 16:28:53 -0400
commit28448b80456feafe07e2d05b6363b00f61f6171e (patch)
treead45836de4e3bdb441a78f825d7f53ed8e8c7096 /net/ipv6
parentb26ba202e0500eb852e89499ece1b2deaa64c3a7 (diff)
downloadop-kernel-dev-28448b80456feafe07e2d05b6363b00f61f6171e.zip
op-kernel-dev-28448b80456feafe07e2d05b6363b00f61f6171e.tar.gz
net: Split sk_no_check into sk_no_check_{rx,tx}
Define separate fields in the sock structure for configuring disabling checksums in both TX and RX-- sk_no_check_tx and sk_no_check_rx. The SO_NO_CHECK socket option only affects sk_no_check_tx. Also, removed UDP_CSUM_* defines since they are no longer necessary. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/udp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index c7ed47b..b8db453 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -797,7 +797,7 @@ static int __udp6_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
/* If zero checksum and sk_no_check is not on for
* the socket then skip it.
*/
- if (uh->check || sk->sk_no_check)
+ if (uh->check || sk->sk_no_check_rx)
stack[count++] = sk;
sk = udp_v6_mcast_next(net, sk_nulls_next(sk), uh->dest, daddr,
@@ -887,7 +887,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
if (sk != NULL) {
int ret;
- if (!uh->check && !sk->sk_no_check) {
+ if (!uh->check && !sk->sk_no_check_rx) {
sock_put(sk);
udp6_csum_zero_error(skb);
goto csum_error;
@@ -1037,7 +1037,7 @@ static int udp_v6_push_pending_frames(struct sock *sk)
if (is_udplite)
csum = udplite_csum_outgoing(sk, skb);
- else if (sk->sk_no_check == UDP_CSUM_NOXMIT) { /* UDP csum disabled */
+ else if (sk->sk_no_check_tx) { /* UDP csum disabled */
skb->ip_summed = CHECKSUM_NONE;
goto send;
} else if (skb->ip_summed == CHECKSUM_PARTIAL) { /* UDP hardware csum */
OpenPOWER on IntegriCloud