From 7df14f8b4ee049182a6e1a594b8bd454f8db2ba6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 12 Jun 2017 08:35:48 -0700 Subject: ofp-actions: Properly interpret "output:in_port". It was being misinterpreted as output:NXM_OF_IN_PORT[]. This interpretation is incorrect because of OpenFlow rules that say that only the special form generated by output:in_port (or "in_port" on its own) actually outputs to the input port. The interpretation here was a no-op. Fixes: 21b2fa617126 ("ofp-parse: Allow match field names in actions and brackets in matches.") Reported-by: nickcooper-zhangtonghao Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme Signed-off-by: Ben Pfaff --- tests/ovs-ofctl.at | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index 6afe8f766..52eaf0320 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -207,6 +207,7 @@ ipv6,actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random)) ipv6,actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random)) ipv6,actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random)) tcp,actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp) +actions=in_port,output:in_port ]]) AT_CHECK([ovs-ofctl parse-flows flows.txt @@ -240,6 +241,7 @@ OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,rando OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random)) OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random)) OFPT_FLOW_MOD: ADD tcp actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp) +OFPT_FLOW_MOD: ADD actions=IN_PORT,IN_PORT ]]) AT_CLEANUP -- cgit v1.2.1