Skip to content

Commit

Permalink
Merge pull request #40 from rcloran/no-icmpv6-cksum
Browse files Browse the repository at this point in the history
Don't calculate checksum for ICMPv6
  • Loading branch information
bparli authored Oct 5, 2023
2 parents 027c393 + 9a10fe9 commit 0eb6d32
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ fn send_echov6(
echo_packet.set_identifier(ping.get_identifier());
echo_packet.set_icmpv6_type(icmpv6::Icmpv6Types::EchoRequest);

let csum = util::checksum(echo_packet.packet(), 1);
echo_packet.set_checksum(csum);
// Note: ICMPv6 checksum always calculated by the kernel, see RFC 3542

tx.send_to(echo_packet, ping.get_addr())
}
Expand Down

0 comments on commit 0eb6d32

Please sign in to comment.