Discussion:
IP cheksum and libnet_pblock_coalesce
Jari Lansio
2004-09-03 06:48:44 UTC
Permalink
Hello everybody,

Should libnet_pblock_coalesce() set the IP checksum correctly? I'm using libnet 1.1.2.1, compiled with GCC 3.2.2 20030222 on Linux.

When I create packet using libnet_build_[udp|tcp]() + libnet_build_ip(), then get the packet using libnet_pblock_coalesce() and then call libnet_ip_check() over the returned buffer, I get non-zero reply, indicating wrong IP checksum.

Interestingly enough, if I create the packet with libnet_build_icmpv4_echo() + libnet_build_ip(), then libnet_ip_check() returns zero (checksum ok).

Am I doing something wrong, or is there a bug?

-jarppe

Loading...