[ovs-dev] [PATCH] ofproto-dpif: Avoid zeroing tunnel info in handle_miss_upcalls().

Ben Pfaff blp at nicira.com
Fri Oct 5 00:00:08 UTC 2012

On Thu, Oct 04, 2012 at 04:55:59PM -0700, Jesse Gross wrote:
> On Thu, Oct 4, 2012 at 3:11 PM, Ben Pfaff <blp at nicira.com> wrote:
> > Commit 296e07ace0f (flow: Extend struct flow to contain tunnel outer
> > header.) changed the tunnel ID parameter of flow_extract() from an integer
> > passed by value to a structure passed by pointer.  Before flow_extract()
> > reads the tunnel ID, it zeros the entire flow parameter.  This means that,
> > if a caller passes the address of the tunnel member of the flow as the
> > tunnel ID, then flow_extract() zeros the tunnel data before it reads and
> > copies the tunnel data (that it just zeroed).  The result is that the
> > tunnel data is ignored.
> >
> > This commit fixes the problem by making the caller that did this use a
> > separate flow structure instead of trying to be clever.
> >
> > Bug #13461.
> > CC: Pankaj Thakkar <thakkar at nicira.com>
> > Reported-by: Michael Hu <mhu at nicira.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> Thanks, the fix looks good.

Thanks, I pushed it.

More information about the dev mailing list