Skip to content

Commit

Permalink
Zero checksum handling for UDP4->UDP6
Browse files Browse the repository at this point in the history
MAP should be transparent to the UDP csum zero in both directions.
  • Loading branch information
angus19 authored and ayourtch committed Oct 23, 2024
1 parent b42c37d commit 1c0066a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nat46/modules/nat46-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,11 @@ void ip6_update_csum(struct sk_buff * skb, struct ipv6hdr * ip6hdr, int do_atomi
struct udphdr *udp = udp_hdr(skb);
unsigned udplen = ntohs(ip6hdr->payload_len) - (do_atomic_frag?8:0); /* UDP hdr + payload */

if ((udp->check == 0) && zero_csum_pass) {
/* zero checksum and the config to pass it is set - do nothing with it */
break;
}

oldsum = udp->check;
udp->check = 0;

Expand Down

0 comments on commit 1c0066a

Please sign in to comment.