summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-09-20 11:01:35 -0700
committerBen Pfaff <blp@ovn.org>2018-09-20 14:15:18 -0700
commitac6409a0f6085fd91a744c5e3c5437b53729964e (patch)
tree2a1dfb22095d5eb57b9be5d27a98211436b337d2
parentae71b6e583107a62774e9b174bf1fcc214655773 (diff)
downloadopenvswitch-ac6409a0f6085fd91a744c5e3c5437b53729964e.tar.gz
meta-flow: Make "nw_frag" a synonym for "ip_frag".
Since the time that OVS introduced support for IP fragments, the OVS functions that format flows have used "nw_frag", but the ones that parse flows have expected "ip_frag". Obviously this is a bug and it's a surprise that it's gone so long without anyone reporting the problem. This fixes it and adds a test. Reported-by: Gurucharan Shetty <guru@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Gurucharan Shetty <guru@ovn.org>
-rw-r--r--lib/meta-flow.h2
-rw-r--r--tests/ofproto-dpif.at10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/meta-flow.h b/lib/meta-flow.h
index 6c0fdae51..5c3e94807 100644
--- a/lib/meta-flow.h
+++ b/lib/meta-flow.h
@@ -1326,7 +1326,7 @@ enum OVS_PACKED_ENUM mf_field_id {
*/
MFF_IP_TTL,
- /* "ip_frag".
+ /* "ip_frag" (aka "nw_frag").
*
* IP fragment information.
*
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index fc43c1d58..fa1a833a2 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -3724,11 +3724,11 @@ AT_SETUP([ofproto-dpif - fragment handling - trace])
OVS_VSWITCHD_START
ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
AT_DATA([flows.txt], [dnl
-priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
-priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
-priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
-priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
-priority=50 tcp ip_frag=later actions=output:6
+priority=75 tcp nw_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
+priority=75 tcp nw_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
+priority=50 tcp nw_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
+priority=50 tcp nw_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
+priority=50 tcp nw_frag=later actions=output:6
])
AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])