nx-match: Improve log message for errors parsing NX flow matches.
authorBen Pfaff <blp@nicira.com>
Tue, 27 Sep 2011 20:03:00 +0000 (13:03 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 18 Oct 2011 20:43:39 +0000 (13:43 -0700)
lib/nx-match.c

index beaed3dacabf270a28c84f9aa57cef546d4c62ae..a850be2ac35a2fc04605f7a4b21fff442eba354a 100644 (file)
@@ -225,12 +225,15 @@ nx_pull_match(struct ofpbuf *b, unsigned int match_len, uint16_t priority,
         }
 
         if (error) {
+            char *msg = ofputil_error_to_string(error);
             VLOG_DBG_RL(&rl, "bad nxm_entry with vendor=%"PRIu32", "
                         "field=%"PRIu32", hasmask=%"PRIu32", type=%"PRIu32" "
-                        "(error %x)",
+                        "(%s)",
                         NXM_VENDOR(header), NXM_FIELD(header),
                         NXM_HASMASK(header), NXM_TYPE(header),
-                        error);
+                        msg);
+            free(msg);
+
             return error;
         }