Skip to contentSkip to conversation

net/ipv6/udp.c: Enforce mandatory checksums as per RFC 2460

PATCH New [email protected] 1 participant 1 message Sep 4, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ipv6/udp.c: Enforce mandatory checksums as per RFC 2460

[UDPv6]: Enforce mandatory checksums as per RFC 2460

The current behaviour of computing outgoing checksums is not compliant with RFC 2460, as per section 8.1:

"Unlike IPv4, when UDP packets are originated by an IPv6 node,
the UDP checksum is not optional. That is, whenever originating a UDP packet, an IPv6 node must compute a UDP checksum over the packet and the pseudo-header, [...]"

This modification hence enforces to ignore sk_no_check on UDPv6.

--

net/ipv6/udp.c +0 -5
index 8d3432a..5122c4d 100644
@@ -567,11 +567,6 @@ static int udp_v6_push_pending_frames(st
        uh->len = htons(up->len);
        uh->check = 0;
 
-       if (sk->sk_no_check == UDP_CSUM_NOXMIT) {
-               skb->ip_summed = CHECKSUM_NONE;
-               goto send;
-       }
-
        if (skb_queue_len(&sk->sk_write_queue) == 1) {
                skb->csum = csum_partial((char *)uh,
                                sizeof(struct udphdr), skb->csum);