Signed-off-by: Joe Stringer <[email protected]>
---
 lib/meta-flow.c |    5 +++++
 lib/nx-match.c  |   10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/lib/meta-flow.c b/lib/meta-flow.c
index b3a4bff..27c97ec 100644
--- a/lib/meta-flow.c
+++ b/lib/meta-flow.c
@@ -2490,6 +2490,11 @@ mf_parse_subfield_name(const char *name, int name_len, 
bool *wild)
             && mf->nxm_name[name_len] == '\0') {
             return mf;
         }
+        if (mf->oxm_name
+            && !strncmp(mf->oxm_name, name, name_len)
+            && mf->oxm_name[name_len] == '\0') {
+            return mf;
+        }
     }
 
     return NULL;
diff --git a/lib/nx-match.c b/lib/nx-match.c
index 920184c..05466ec 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -838,7 +838,15 @@ nxm_parse_reg_load(struct nx_action_reg_load *load, const 
char *s)
 
     ofputil_init_NXAST_REG_LOAD(load);
     load->ofs_nbits = nxm_encode_ofs_nbits(dst.ofs, dst.n_bits);
-    load->dst = htonl(dst.field->nxm_header);
+
+    if (dst.field->nxm_header != 0) {
+        load->dst = htonl(dst.field->nxm_header);
+    } else if (dst.field->oxm_header != 0) {
+        load->dst = htonl(dst.field->oxm_header);
+    } else {
+        ovs_fatal(0, "%s: invalid destination field", full_s);
+    }
+
     load->value = htonll(value);
 }
 
-- 
1.7.2.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to