From: Ben Pfaff <blp@nicira.com>
Date: Fri, 1 Oct 2010 20:05:23 +0000 (-0700)
Subject: ofp-parse: Properly byteswap in_port.
X-Git-Tag: v1.1.0~1053
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bb98f9b951af0f6438d921522a8f54f5ead0d1d0;p=sliver-openvswitch.git

ofp-parse: Properly byteswap in_port.
---

diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index 312eaaaaf..32e790a86 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -465,10 +465,12 @@ parse_ofp_str(char *string, struct ofp_match *match, struct ofpbuf *actions,
                 if (!strcmp(value, "*") || !strcmp(value, "ANY")) {
                     wildcards |= f->wildcard;
                 } else {
+                    uint16_t port_no;
+
                     wildcards &= ~f->wildcard;
                     if (f->wildcard == OFPFW_IN_PORT
-                        && parse_port_name(value, (uint16_t *) data)) {
-                        /* Nothing to do. */
+                        && parse_port_name(value, &port_no)) {
+                        match->in_port = htons(port_no);
                     } else if (f->type == F_U8) {
                         *(uint8_t *) data = str_to_u32(value);
                     } else if (f->type == F_U16) {