[ovs-dev] [PATCH v2 02/19] ofp-parse: Remove unused F_OUT_PORT field flag.

Ben Pfaff blp at nicira.com
Fri May 29 22:52:41 UTC 2015


On Mon, May 18, 2015 at 04:10:11PM -0700, Jarno Rajahalme wrote:
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>

I think the correct fix is more like this:

diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index 856044d..0e265a7 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -353,7 +353,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
                 if (fm->table_id != 0xff) {
                     *usable_protocols &= OFPUTIL_P_TID;
                 }
-            } else if (!strcmp(name, "out_port")) {
+            } else if (field & F_OUT_PORT && !strcmp(name, "out_port")) {
                 if (!ofputil_port_from_string(value, &fm->out_port)) {
                     error = xasprintf("%s is not a valid OpenFlow port",
                                       value);



More information about the dev mailing list