projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovsdb: Add new "mutation" operation to transactions.
[openvswitch]
/
utilities
/
ovs-openflowd.c
diff --git
a/utilities/ovs-openflowd.c
b/utilities/ovs-openflowd.c
index c275cd6a599703b58ed65cc707fd9c4936a609e7..7f79a5270666e78705aeeb96f5522b1239d4a2ab 100644
(file)
--- a/
utilities/ovs-openflowd.c
+++ b/
utilities/ovs-openflowd.c
@@
-345,14
+345,9
@@
parse_options(int argc, char *argv[], struct ofsettings *s)
switch (c) {
case OPT_DATAPATH_ID:
switch (c) {
case OPT_DATAPATH_ID:
- if (strlen(optarg) != 12
- || strspn(optarg, "0123456789abcdefABCDEF") != 12) {
+ if (!dpid_from_string(optarg, &s->datapath_id)) {
ovs_fatal(0, "argument to --datapath-id must be "
ovs_fatal(0, "argument to --datapath-id must be "
- "exactly 12 hex digits");
- }
- s->datapath_id = strtoll(optarg, NULL, 16);
- if (!s->datapath_id) {
- ovs_fatal(0, "argument to --datapath-id must be nonzero");
+ "exactly 12 hex digits and may not be all-zero");
}
break;
}
break;