Commit d3a1be9cba86c4385a5fe46673bbb4730551f454

Authored by Brian Haley
Committed by David S. Miller
1 parent f465e489c4

[IPv6]: Only modify checksum for UDP

Only change upper-layer checksum from 0 to 0xFFFF for UDP (as RFC 768
states), not for others as RFC 4443 doesn't require it.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 2 changed files with 1 additions and 3 deletions Side-by-side Diff

... ... @@ -247,8 +247,6 @@
247 247 len, fl->proto, tmp_csum);
248 248 icmp6h->icmp6_cksum = tmp_csum;
249 249 }
250   - if (icmp6h->icmp6_cksum == 0)
251   - icmp6h->icmp6_cksum = -1;
252 250 ip6_push_pending_frames(sk);
253 251 out:
254 252 return err;
... ... @@ -536,7 +536,7 @@
536 536 &fl->fl6_dst,
537 537 total_len, fl->proto, tmp_csum);
538 538  
539   - if (tmp_csum == 0)
  539 + if (tmp_csum == 0 && fl->proto == IPPROTO_UDP)
540 540 tmp_csum = -1;
541 541  
542 542 csum = tmp_csum;