bparli / fastping-rs

ICMP ping library in Rust inspired by go-fastping and AnyEvent::FastPing Perl module
MIT License
76 stars 12 forks source link

Don't calculate checksum for ICMPv6 #40

Closed rcloran closed 1 year ago

rcloran commented 1 year ago

The kernel will calculate checksums for ICMPv6 if the protocol for the socket is set to ICMPv6, see RFC 3542.

pnet does set the socket protocol to ICMPv6 appropriately: https://github.com/libpnet/libpnet/blob/main/pnet_transport/src/lib.rs#L112

I've verified this works correctly on Linux (5.15) and macOS (13.5).

bparli commented 1 year ago

Nice!