ovsdb-idlc: Fix sizeof calculation in generated code.
[openvswitch] / utilities / ovs-openflowd.c
index 1460423d6d468dc8d5694d88d67c5d5f0cbb17b0..ebfc3c33efc84e9fe7af5873f2894f803104d6d3 100644 (file)
@@ -122,14 +122,8 @@ main(int argc, char *argv[])
     if (s.ports.n) {
         const char *port;
         size_t i;
-        struct netdev *netdev;
 
         SVEC_FOR_EACH (i, port, &s.ports) {
-            error = netdev_open_default(port, &netdev);
-            if (error) {
-                ovs_fatal(error, "failed to open %s as a device", port);
-            }
-
             error = dpif_port_add(dpif, port, 0, NULL);
             if (error) {
                 ovs_fatal(error, "failed to add %s as a port", port);
@@ -336,12 +330,14 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
             break;
 
         case OPT_FAIL_MODE:
-            if (!strcmp(optarg, "open")) {
+            if (!strcmp(optarg, "open") || !strcmp(optarg, "standalone")) {
                 controller_opts.fail = OFPROTO_FAIL_STANDALONE;
-            } else if (!strcmp(optarg, "closed")) {
+            } else if (!strcmp(optarg, "closed")
+                       || !strcmp(optarg, "secure")) {
                 controller_opts.fail = OFPROTO_FAIL_SECURE;
             } else {
-                ovs_fatal(0, "--fail argument must be \"open\" or \"closed\"");
+                ovs_fatal(0, "--fail argument must be \"standalone\" "
+                          "or \"secure\"");
             }
             break;