From 146356e958188ef0a9f32e66e674fee2cf669102 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 1 Feb 2013 00:11:32 -0800 Subject: [PATCH] ofp-parse: Ignore "idle_age" and "hard_age" when parsing a flow string. 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 --- lib/ofp-parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 6f35c1270..cfcf5bf0c 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -914,7 +914,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. */ -- 2.43.0