git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flow: Fix struct flow size build assertion failure.
[sliver-openvswitch.git]
/
utilities
/
ovs-ofctl.c
diff --git
a/utilities/ovs-ofctl.c
b/utilities/ovs-ofctl.c
index
2d98273
..
dea8878
100644
(file)
--- a/
utilities/ovs-ofctl.c
+++ b/
utilities/ovs-ofctl.c
@@
-741,9
+741,8
@@
fetch_ofputil_phy_port(const char *vconn_name, const char *port_name,
static uint16_t
str_to_port_no(const char *vconn_name, const char *port_name)
{
static uint16_t
str_to_port_no(const char *vconn_name, const char *port_name)
{
- unsigned int port_no;
-
- if (str_to_uint(port_name, 10, &port_no)) {
+ uint16_t port_no = ofputil_port_from_string(port_name);
+ if (port_no) {
return port_no;
} else {
struct ofputil_phy_port pp;
return port_no;
} else {
struct ofputil_phy_port pp;
@@
-1466,9
+1465,7
@@
ofctl_packet_out(int argc, char *argv[])
parse_ofpacts(argv[3], &ofpacts);
po.buffer_id = UINT32_MAX;
parse_ofpacts(argv[3], &ofpacts);
po.buffer_id = UINT32_MAX;
- po.in_port = (!strcasecmp(argv[2], "none") ? OFPP_NONE
- : !strcasecmp(argv[2], "local") ? OFPP_LOCAL
- : str_to_port_no(argv[1], argv[2]));
+ po.in_port = str_to_port_no(argv[1], argv[2]);
po.ofpacts = ofpacts.data;
po.ofpacts_len = ofpacts.size;
po.ofpacts = ofpacts.data;
po.ofpacts_len = ofpacts.size;
@@
-1969,7
+1966,7
@@
fte_make_flow_mod(const struct fte *fte, int index, uint16_t command,
struct ofputil_flow_mod fm;
struct ofpbuf *ofm;
struct ofputil_flow_mod fm;
struct ofpbuf *ofm;
-
fm.match = fte->rule.match
;
+
minimatch_expand(&fte->rule.match, &fm.match)
;
fm.priority = fte->rule.priority;
fm.cookie = htonll(0);
fm.cookie_mask = htonll(0);
fm.priority = fte->rule.priority;
fm.cookie = htonll(0);
fm.cookie_mask = htonll(0);