projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-vsctl: Improve documentation and --help output.
[openvswitch]
/
utilities
/
ovs-openflowd.c
diff --git
a/utilities/ovs-openflowd.c
b/utilities/ovs-openflowd.c
index 153267f3f0329705827a854e2089b28c9bae9e5d..486eae288e9e56ab3cd2d9823d18cb9d546b8dd4 100644
(file)
--- a/
utilities/ovs-openflowd.c
+++ b/
utilities/ovs-openflowd.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010
, 2011
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-128,10
+128,19
@@
main(int argc, char *argv[])
size_t i;
SVEC_FOR_EACH (i, port, &s.ports) {
size_t i;
SVEC_FOR_EACH (i, port, &s.ports) {
- error = dpif_port_add(dpif, port, 0, NULL);
+ struct netdev *netdev;
+
+ error = netdev_open_default(port, &netdev);
+ if (error) {
+ ovs_fatal(error, "%s: failed to open network device", port);
+ }
+
+ error = dpif_port_add(dpif, netdev, NULL);
if (error) {
ovs_fatal(error, "failed to add %s as a port", port);
}
if (error) {
ovs_fatal(error, "failed to add %s as a port", port);
}
+
+ netdev_close(netdev);
}
}
}
}
@@
-225,7
+234,8
@@
parse_options(int argc, char *argv[], struct ofsettings *s)
OPT_UNIXCTL,
OPT_ENABLE_DUMMY,
VLOG_OPTION_ENUMS,
OPT_UNIXCTL,
OPT_ENABLE_DUMMY,
VLOG_OPTION_ENUMS,
- LEAK_CHECKER_OPTION_ENUMS
+ LEAK_CHECKER_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"datapath-id", required_argument, 0, OPT_DATAPATH_ID},
};
static struct option long_options[] = {
{"datapath-id", required_argument, 0, OPT_DATAPATH_ID},