[ovs-dev] [RFC PATCH v2 1/2] miniflow_extract: Properly handle small IP packets.

Jarno Rajahalme jrajahalme at nicira.com
Mon Nov 10 21:43:15 UTC 2014


On Nov 6, 2014, at 3:58 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Wed, Nov 05, 2014 at 10:37:18AM -0800, Jarno Rajahalme wrote:
>> Ethernet frames may contain padding after the IP payload.  When
>> parsing IP packets, check the IP total size (IPv4) or IP payload size
>> (IPv6) to detect the size of l2 padding.  The l2 padding size is
>> stored in the ofpbuf to prevent ofpbuf_pull from entering the padding,
>> as well as to allow ofpbuf_l4_size() to return the size of the IP
>> payload without the l2 padding.
>> 
>> This helps avoiding parsing truncated transport headers, for example.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> 
> Acked-by: Ben Pfaff <blp at nicira.com>

Thanks for the review, Ben!

Pushed to master,

  Jarno




More information about the dev mailing list