diff options
| author | Andrew Evans <aevans@nicira.com> | 2011-06-17 12:24:54 -0700 |
|---|---|---|
| committer | Andrew Evans <aevans@nicira.com> | 2011-06-17 12:25:42 -0700 |
| commit | ec610b7bf4f4890f50c2c7d2fbfe6120ad9312f1 (patch) | |
| tree | b503c9b5be3b1eb22f6da085dfacf600e95a1e9e /utilities | |
| parent | da7198b411d68df604db1a6132cf3be5c21842db (diff) | |
| download | openvswitch-ec610b7bf4f4890f50c2c7d2fbfe6120ad9312f1.tar.gz | |
ovs-ofctl: Print the offending flow on parse error when reading from a file.
When an error is encountered while parsing flows from a file, ovs-ofctl doesn't
print the erroneous flow, so it's not always obvious which flow is causing
the error. Print the flow before the error message to make it clear.
Diffstat (limited to 'utilities')
| -rw-r--r-- | utilities/ovs-ofctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 6c7e3ac10..7d3b7fbee 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -658,7 +658,7 @@ do_flow_mod__(int argc, char *argv[], uint16_t command) flow_mod_table_id = false; parse_ofp_flow_mod_str(&requests, &flow_format, &flow_mod_table_id, - argc > 2 ? argv[2] : "", command); + argc > 2 ? argv[2] : "", command, false); check_final_format_for_flow_mod(flow_format); open_vconn(argv[1], &vconn); @@ -1035,7 +1035,7 @@ read_flows_from_file(const char *filename, struct classifier *cls, int index) struct flow_mod fm; ofpbuf_init(&actions, 64); - parse_ofp_str(&fm, &actions, ds_cstr(&s)); + parse_ofp_str(&fm, &actions, ds_cstr(&s), true); version = xmalloc(sizeof *version); version->cookie = fm.cookie; @@ -1308,7 +1308,7 @@ do_parse_flow(int argc OVS_UNUSED, char *argv[]) list_init(&packets); parse_ofp_flow_mod_str(&packets, &flow_format, &flow_mod_table_id, - argv[1], OFPFC_ADD); + argv[1], OFPFC_ADD, false); print_packet_list(&packets); } |
