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>
Cette révision appartient à :

révisé par
David S. Miller

Parent
b26ba202e0
révision
28448b8045
@@ -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 */
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur