[ovs-dev] [PATCH] packet: Match userspace and kernel definition of ICMP header.

Ben Pfaff blp at nicira.com
Tue Dec 27 19:10:25 UTC 2011


On Tue, Dec 27, 2011 at 10:48:44AM -0800, Jesse Gross wrote:
> Current userspace considers an ICMP header to be 4 bytes consisting
> of the type, code, and checksum.  The kernel considers it to be 8
> bytes because it also counts the two data fields that contain
> type-specific information (and are always present).  Since flow
> extract will zero out headers that are not completely present this
> means that an ICMP packet that has a header of 5-7 bytes will be
> interpreted differently by userspace and kernel.  This fixes the
> problem by adopting the kernel's version of the ICMP header in
> userspace.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

How did you notice this?

The patch looks fine, thanks.



More information about the dev mailing list