ofp-parse: Ignore "idle_age" and "hard_age" when parsing a flow string.
authorJustin Pettit <jpettit@nicira.com>
Fri, 1 Feb 2013 08:11:32 +0000 (00:11 -0800)
committerJustin Pettit <jpettit@nicira.com>
Fri, 1 Feb 2013 21:55:47 +0000 (13:55 -0800)
It should be possible to feed to output of "ovs-ofctl dump-flows" to
"ovs-ofctl add-flows".  However, some of the metadata needs to be
ignored.  "idle_age" and "hard_age" was recently added to the output of
"ovs-ofctl dump-flows", but they were not ignored like the other
metadata.  This commit ignores them.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
lib/ofp-parse.c

index 1d5b7ea..3c3d255 100644 (file)
@@ -893,7 +893,9 @@ parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_,
                 parse_field(mf_from_name(name), value, &fm->match);
             } else if (!strcmp(name, "duration")
                        || !strcmp(name, "n_packets")
-                       || !strcmp(name, "n_bytes")) {
+                       || !strcmp(name, "n_bytes")
+                       || !strcmp(name, "idle_age")
+                       || !strcmp(name, "hard_age")) {
                 /* Ignore these, so that users can feed the output of
                  * "ovs-ofctl dump-flows" back into commands that parse
                  * flows. */