summaryrefslogtreecommitdiff
path: root/utilities/ovs-openflowd.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2010-07-15 20:56:43 -0700
committerJustin Pettit <jpettit@nicira.com>2010-07-30 21:26:54 -0700
commit31681a5d627cec70864764586829bdb92abf2f30 (patch)
tree26c2117bbfc16091c65be3cb9cbd630b9253df70 /utilities/ovs-openflowd.c
parent1a048029a0902439c3f17c49a7f71e4d09fecf70 (diff)
downloadopenvswitch-31681a5d627cec70864764586829bdb92abf2f30.tar.gz
vswitchd: Move fail-mode config to Bridge table
Configuration of the fail-mode was an attribute of the Controller table. However, it makes more sense as an attribute of the Bridge table, since the behavior defines what a bridge should do if it can't connect to *any* controller. This commit makes the move.
Diffstat (limited to 'utilities/ovs-openflowd.c')
-rw-r--r--utilities/ovs-openflowd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/utilities/ovs-openflowd.c b/utilities/ovs-openflowd.c
index bb77d5896..6dda8fb95 100644
--- a/utilities/ovs-openflowd.c
+++ b/utilities/ovs-openflowd.c
@@ -53,6 +53,7 @@ struct ofsettings {
/* Controller configuration. */
struct ofproto_controller *controllers;
size_t n_controllers;
+ enum ofproto_fail_mode fail_mode;
/* Datapath. */
uint64_t datapath_id; /* Datapath ID. */
@@ -165,6 +166,7 @@ main(int argc, char *argv[])
ovs_fatal(error, "failed to configure STP");
}
ofproto_set_controllers(ofproto, s.controllers, s.n_controllers);
+ ofproto_set_fail_mode(ofproto, s.fail_mode);
daemonize_complete();
@@ -265,12 +267,12 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
controller_opts.target = NULL;
controller_opts.max_backoff = 8;
controller_opts.probe_interval = 5;
- controller_opts.fail = OFPROTO_FAIL_STANDALONE;
controller_opts.band = OFPROTO_IN_BAND;
controller_opts.accept_re = NULL;
controller_opts.update_resolv_conf = true;
controller_opts.rate_limit = 0;
controller_opts.burst_limit = 0;
+ s->fail_mode = OFPROTO_FAIL_STANDALONE;
s->datapath_id = 0;
s->mfr_desc = NULL;
s->hw_desc = NULL;
@@ -329,10 +331,10 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
case OPT_FAIL_MODE:
if (!strcmp(optarg, "open") || !strcmp(optarg, "standalone")) {
- controller_opts.fail = OFPROTO_FAIL_STANDALONE;
+ s->fail_mode = OFPROTO_FAIL_STANDALONE;
} else if (!strcmp(optarg, "closed")
|| !strcmp(optarg, "secure")) {
- controller_opts.fail = OFPROTO_FAIL_SECURE;
+ s->fail_mode = OFPROTO_FAIL_SECURE;
} else {
ovs_fatal(0, "--fail argument must be \"standalone\" "
"or \"secure\"");