ipv6: udp: check sk->sk_no_check when sending udpv6 packet
Subsystems (3)
PATCH 1/1 ipv6: udp: check sk->sk_no_check when sending udpv6 packet
According to the user's intention, if SO_NO_CHECK option is set to true, the udpv6 packet should be out with no checksum.
Signed-off-by Duan Jiong <[email protected]>
--- net/ipv6/udp.c | 4 ++++ 1 file changed, 4 insertions(+)
net/ipv6/udp.c +4 -0
@@ -1001,6 +1001,10 @@ 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 ) { + skb->ip_summed =CHECKSUM_NONE ; + goto send; + }else if (skb->ip_summed ==CHECKSUM_PARTIAL ) {/* UDP hardware csum */ udp6_hwcsum_outgoing (sk, skb, &fl6->saddr, &fl6->daddr, up->len);
Signature · 1 line
1.8.3.1
David Miller
maintainerFrom: Duan Jiong <[email protected]>
Date: Mon, 20 Jan 2014 11:51:01 +0800
Quoted 4 lines
According to the user's intention, if
SO_NO_CHECKoption is set to true, the udpv6 packet should be out with no checksum.Signed-off-by Duan Jiong <[email protected]>
This is intentionally not supported in ipv6.
Quoted 3 lines · Duan Jiong
According to the user's intention, if
SO_NO_CHECKoption is set to true, the udpv6 packet should be out with no checksum.
Nak, UDP checksumming is mandatory when used with IPv6.
Greetings,
Hannes