[ovs-dev] [PATCH] ofproto-dpif: Fix uninitialized struct member in xlate_actions().

Ben Pfaff blp at nicira.com
Mon Oct 24 10:49:46 PDT 2011


On Mon, Oct 24, 2011 at 10:48:34AM -0700, Jesse Gross wrote:
> On Mon, Oct 24, 2011 at 10:00 AM, Ben Pfaff <blp at nicira.com> wrote:
> > Commit 7257b535ab "Implement new fragment handling policy." moved around
> > a bunch of initialization code in xlate_actions() so that the assignment
> > to ctx->flow.tp_src and .tp_dst would not have to also assign to
> > ctx->base_flow.tp_src and .tp_dst. ??However, this meant that the early-exit
> > "return" in the new switch statement exited without initializing a lot of
> > the context. ??In particular 'may_set_up_flow' didn't get initialized, so
> > something the early-exit would produce a flow that couldn't be installed,
> > which wasn't the intent.
> >
> > It seems that this optimization was a bad tradeoff, so this commit puts
> > all of the initialization up front and just assigns to both copies of the
> > tp_src and tp_dst members.
> >
> > Fixes a nondeterministic "make check" failure in the VLAN handling test.
> 
> Looks good to me.

Thanks, I'll push this soon.



More information about the dev mailing list