[ovs-git] Open vSwitch: ofproto-dpif: Fix uninitialized struct member in xlate_actions(). (master)

dev at openvswitch.org dev at openvswitch.org
Mon Oct 24 17:58:21 UTC 2011

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  97e42c92a9b7d4642f0df49d217c3c2f782175f9 (commit)
      from  023e1e0a4d0a9f6937d9a2c66ba30d502029c4df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 97e42c92a9b7d4642f0df49d217c3c2f782175f9
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=97e42c92a9b7d4642f0df49d217c3c2f782175f9
Author: Ben Pfaff <blp at nicira.com>
ofproto-dpif: Fix uninitialized struct member in xlate_actions().
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.


Summary of changes:
 ofproto/ofproto-dpif.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

Open vSwitch

More information about the git mailing list