udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
])
+ovs-appctl time/stop
AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
dnl Checksum SCTP.
OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
ADD_OF_PORTS([br0], 1, 2)
+ovs-appctl time/stop
ON_EXIT([kill `cat test-netflow.pid`])
AT_CHECK([test-netflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > netflow.log], [0], [], [ignore])
AT_CAPTURE_FILE([netflow.log])
AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
get_ages duration1 hard1 idle1
+ovs-appctl time/stop
# Warp time forward by 10 seconds, then modify the flow's actions.
ovs-appctl time/warp 10000
get_ages duration2 hard2 idle2
[NXST_FLOW reply:
idle_timeout=60, actions=fin_timeout(idle_timeout=5)
])
+
+ovs-appctl time/stop
# Check that a TCP SYN packet does not change the timeout. (Because
# flow stats updates are mainly what implements the fin_timeout
# feature, we warp forward a couple of times to ensure that flow stats
OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
ADD_OF_PORTS([br0], 1, 2)
+ovs-appctl time/stop
ovs-appctl time/warp 10000
AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
ADD_OF_PORTS([br0], [7])
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
AT_CHECK([ovs-ofctl add-flow br1 action=normal])
+ovs-appctl time/stop
ovs-appctl time/warp 5000
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
table=0 in_port=1 actions=load:2->NXM_NX_REG0[[0..15]],learn(table=1,priority=65535,NXM_OF_ETH_SRC[[]],NXM_OF_VLAN_TCI[[0..11]],output:NXM_NX_REG0[[0..15]]),output:2
])
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
+ovs-appctl time/stop
# We send each packet twice because the first packet in each flow causes the
# flow table to change and thus revalidations, which (depending on timing)
# can keep a megaflow from being installed. The revalidations are done by