diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-02-20 14:28:43 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2014-02-22 12:46:06 +0900 |
commit | 07f0265830fcae2632159e9993b93a161d7ea23b (patch) | |
tree | 04699deb1961d1ca61261da7af83d1be29755a14 /checksum.h | |
parent | fbef82d10366495bbd0dbb30cea015cb67c8105a (diff) | |
download | android_external_android-clat-07f0265830fcae2632159e9993b93a161d7ea23b.tar.gz android_external_android-clat-07f0265830fcae2632159e9993b93a161d7ea23b.tar.bz2 android_external_android-clat-07f0265830fcae2632159e9993b93a161d7ea23b.zip |
Modify the pseudo-header checksum functions.
- Remove the initial checksum, which we don't use anywhere.
- Add the upper-layer protocol to the IPv6 function. Currently
this is always the same as the next header field in the IPv6
header, but technically it's the upper-layer header after all
the extension headers. This is required to support fragments.
Bug: 11542311
Change-Id: Ie1a20fa74ee5bc933c1014bab74ae2957979b2b8
Diffstat (limited to 'checksum.h')
-rw-r--r-- | checksum.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,8 +22,8 @@ uint32_t ip_checksum_add(uint32_t current, const void *data, int len); uint16_t ip_checksum_finish(uint32_t temp_sum); uint16_t ip_checksum(const void *data, int len); -uint32_t ipv6_pseudo_header_checksum(uint32_t current, const struct ip6_hdr *ip6, uint16_t len); -uint32_t ipv4_pseudo_header_checksum(uint32_t current, const struct iphdr *ip, uint16_t len); +uint32_t ipv6_pseudo_header_checksum(const struct ip6_hdr *ip6, uint16_t len, uint8_t protocol); +uint32_t ipv4_pseudo_header_checksum(const struct iphdr *ip, uint16_t len); uint16_t ip_checksum_adjust(uint16_t checksum, uint32_t old_hdr_sum, uint32_t new_hdr_sum); |