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)) {
}
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);
}
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);
}
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;