aboutsummaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-11-21 19:18:14 -0800
committerEthan Jackson <ethan@nicira.com>2011-11-22 17:04:10 -0800
commitbe51a44695b8e2a3efd729524b2c08d32ed572db (patch)
tree25ab8cc4db90a3eee4d9de8792a2734b9a8b44e2 /ofproto/ofproto-dpif.c
parent0145d7ed02095b091286681a522ace82eeede9e9 (diff)
ofproto-dpif: Properly update tos and ttl fields.
ofproto-dpif failed to update the base flow's tos and ttl fields when preparing for an output action. This could cause redundant updates of those fields in the datapath. A future patch adds a test which could have caught the issue for the tos bits.
Diffstat (limited to 'ofproto/ofproto-dpif.c')
-rw-r--r--ofproto/ofproto-dpif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index afdd0850..68a87d59 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3698,9 +3698,9 @@ commit_set_nw_action(const struct flow *flow, struct flow *base,
ipv4_key.ipv4_src = base->nw_src = flow->nw_src;
ipv4_key.ipv4_dst = base->nw_dst = flow->nw_dst;
+ ipv4_key.ipv4_tos = base->nw_tos = flow->nw_tos;
+ ipv4_key.ipv4_ttl = base->nw_ttl = flow->nw_ttl;
ipv4_key.ipv4_proto = base->nw_proto;
- ipv4_key.ipv4_tos = flow->nw_tos;
- ipv4_key.ipv4_ttl = flow->nw_ttl;
ipv4_key.ipv4_frag = (base->nw_frag == 0 ? OVS_FRAG_TYPE_NONE
: base->nw_frag == FLOW_NW_FRAG_ANY
? OVS_FRAG_TYPE_FIRST : OVS_FRAG_TYPE_LATER);