Skip to content

Commit 1c0066a

Browse files
angus19ayourtch
authored andcommitted
Zero checksum handling for UDP4->UDP6
MAP should be transparent to the UDP csum zero in both directions.
1 parent b42c37d commit 1c0066a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nat46/modules/nat46-core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,11 @@ void ip6_update_csum(struct sk_buff * skb, struct ipv6hdr * ip6hdr, int do_atomi
17661766
struct udphdr *udp = udp_hdr(skb);
17671767
unsigned udplen = ntohs(ip6hdr->payload_len) - (do_atomic_frag?8:0); /* UDP hdr + payload */
17681768

1769+
if ((udp->check == 0) && zero_csum_pass) {
1770+
/* zero checksum and the config to pass it is set - do nothing with it */
1771+
break;
1772+
}
1773+
17691774
oldsum = udp->check;
17701775
udp->check = 0;
17711776

0 commit comments

Comments
 (0)