Set fail-open explicitly as default.
authorBen Pfaff <blp@nicira.com>
Fri, 13 Jun 2008 17:16:58 +0000 (10:16 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 13 Jun 2008 17:16:58 +0000 (10:16 -0700)
It was the default accidentally before, because FAIL_OPEN happened
to have the value 0.

secchan/secchan.c

index d1e619c29e36ab66b272766697e63f5db61c0317..2a2eef6683d9c34cbceb5abe492c98279e73e106 100644 (file)
@@ -100,7 +100,7 @@ static uint8_t local_mac[ETH_ADDR_LEN];
 static struct mac_learning *local_ml;
 
 /* -f, --fail: Behavior when the connection to the controller fails. */
-static enum fail_mode fail_mode;
+static enum fail_mode fail_mode = FAIL_OPEN;
 
 /* -d, --fail-open-delay: Number of seconds after which to fail open, when
  * fail_mode is FAIL_OPEN. */
@@ -542,8 +542,8 @@ usage(void)
     vconn_usage(true, true);
     printf("\nNetworking options:\n"
            "  -f, --fail=open|closed  when controller connection fails:\n"
-           "                            closed (default): drop all packets\n"
-           "                            open: act as learning switch\n"
+           "                            closed: drop all packets\n"
+           "                            open (default): act as learning switch\n"
            "  -d, --fail-open-delay=SECS  number of seconds after which to\n"
            "                          fail open if --fail=open (default: 30)\n"
            "  -l, --listen=METHOD     allow management connections on METHOD\n"