X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=7cdf42db6e66382e1bf54f32907a54ba0c4546dc;hb=3a27375ead10be81e7122aaff8bb2a17c7c202a7;hp=7d3b7fbeead0415e9d552b7853035d8229124862;hpb=ec610b7bf4f4890f50c2c7d2fbfe6120ad9312f1;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 7d3b7fbe..7cdf42db 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -233,7 +233,7 @@ open_vconn__(const char *name, const char *default_suffix, free(datapath_name); free(datapath_type); - if (strstr(name, ":")) { + if (strchr(name, ':')) { run(vconn_open_block(name, OFP_VERSION, vconnp), "connecting to %s", name); } else if (!stat(name, &s) && S_ISSOCK(s.st_mode)) { @@ -247,7 +247,7 @@ open_vconn__(const char *name, const char *default_suffix, } open_vconn_socket(socket_name, vconnp); } else { - ovs_fatal(0, "%s is not a valid connection method", name); + ovs_fatal(0, "%s is not a bridge or a socket", name); } free(bridge_path); @@ -951,8 +951,7 @@ fte_version_print(const struct fte_version *version) } ds_init(&s); - ofp_print_actions(&s, (const struct ofp_action_header *) version->actions, - version->n_actions * sizeof *version->actions); + ofp_print_actions(&s, version->actions, version->n_actions); printf(" %s\n", ds_cstr(&s)); ds_destroy(&s); } @@ -1035,7 +1034,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), true); + parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), true); version = xmalloc(sizeof *version); version->cookie = fm.cookie;