summaryrefslogtreecommitdiff
path: root/tests/ofproto.at
diff options
context:
space:
mode:
authorAshish Varma <ashishvarma.ovs@gmail.com>2019-07-23 13:02:10 -0700
committerBen Pfaff <blp@ovn.org>2019-11-01 14:35:00 -0700
commit3e613cd81ce77b5c3da2e9f11a87830bec849bce (patch)
tree8ad8d984a7d5f321ce40faf6050650e541cc6e2b /tests/ofproto.at
parentd5ac9628233c2d3b86c30e26522018f487bf3dc9 (diff)
downloadopenvswitch-3e613cd81ce77b5c3da2e9f11a87830bec849bce.tar.gz
ofp-monitor: Fixed the usage of 'usable_protocols' variable in 'parse_flow_monitor_request' function.
'usable_protocols' is now getting set to OFPUTIL_P_OF10_ANY on return from 'parse_flow_monitor_request' function. The calling function now checks for the value in this variable against the 'allowed_protocols' variable. Also a check is added for a match field which is not supported in OpenFlow 1.0 and return an error. Modified the man page of ovs-ofctl to reflect Flow Monitor support as OpenFlow 1.0 Nicira extension only. Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/ofproto.at')
-rw-r--r--tests/ofproto.at21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ofproto.at b/tests/ofproto.at
index c81409d9d..2436434ca 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -5124,6 +5124,27 @@ NXT_FLOW_MONITOR_RESUMED:
OVS_VSWITCHD_STOP
AT_CLEANUP
+AT_SETUP([ofproto - flow monitoring usable protocols])
+AT_KEYWORDS([monitor])
+
+OVS_VSWITCHD_START
+
+on_exit 'kill `cat ovs-ofctl.pid`'
+ovs-ofctl -OOpenFlow14 monitor br0 watch:udp,udp_dst=8 --detach --no-chdir --pidfile >monitor.log 2>&1
+AT_CAPTURE_FILE([monitor.log])
+
+# ovs-ofctl should exit because monitor is not supported in OpenFlow 1.4
+OVS_WAIT_UNTIL([grep "ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM) is among the allowed flow formats (OXM-OpenFlow14)" monitor.log])
+
+# check that only NXM flag is returned as usable protocols for sctp_dst
+# and ovs-ofctl should exit since monitor is not supported in OpenFlow 1.4
+ovs-ofctl -OOpenFlow14 monitor br0 watch:sctp,sctp_dst=9 --detach --no-chdir --pidfile >monitor.log 2>&1
+OVS_WAIT_UNTIL([grep "ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OXM-OpenFlow14)" monitor.log])
+
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
+
AT_SETUP([ofproto - event filtering (OpenFlow 1.3)])
AT_KEYWORDS([monitor])
OVS_VSWITCHD_START