projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d37aaf
)
ovs-ofctl: Fix return value of str_to_port_no().
author
Ben Pfaff
<blp@nicira.com>
Tue, 16 Nov 2010 18:25:22 +0000
(10:25 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 17 Nov 2010 17:21:09 +0000
(09:21 -0800)
The index into the array of ports returned in the OFPT_FEATURES_REPLY
message is not necessarily the same as the port number, so this fixes a
real bug.
utilities/ovs-ofctl.c
patch
|
blob
|
history
diff --git
a/utilities/ovs-ofctl.c
b/utilities/ovs-ofctl.c
index 1901e242a2369c47fb4c59744a99d7487c50159b..e46e1a2dbe23f0ccab8d7beeb40f7fbe692e7a5e 100644
(file)
--- a/
utilities/ovs-ofctl.c
+++ b/
utilities/ovs-ofctl.c
@@
-431,7
+431,7
@@
str_to_port_no(const char *vconn_name, const char *str)
ofpbuf_delete(reply);
vconn_close(vconn);
- return
port_idx
;
+ return
ntohs(osf->ports[port_idx].port_no)
;
}
static void