commit | ee80ca65907d214e2483e315a1ba7f610184de03 | [log] [tgz] |
---|---|---|
author | Lorenzo Colitti <lorenzo@google.com> | Wed Apr 10 16:52:22 2013 +0900 |
committer | Lorenzo Colitti <lorenzo@google.com> | Fri Apr 12 12:35:41 2013 +0900 |
tree | 9fb525e543515052c55a8c52ca9db6c4a790d89a | |
parent | d90841824dc00f65a48a789396c7f428807432ca [diff] |
Improve checksum calculation and address checking 1. Add a function that calculates the checksum of all the packet components starting from the specified position. This simplifies the code a bit and makes it easier to translate nested packets like ICMP error messages. 2. Don't hardcode IP source and destination addresses. This is required to translate ICMP error messages. Bug: 8276725 Change-Id: I2cae45683ae3943e508608fd0a140180dbc60823