Add a warning when secchan is invoked with a controller specified as the datapath.
authorBen Pfaff <blp@nicira.com>
Mon, 27 Oct 2008 22:13:11 +0000 (15:13 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 27 Oct 2008 22:13:11 +0000 (15:13 -0700)
secchan/secchan.c

index 345620e2e89434048eeaf6813fcbae0910d3bf8e..0f55cde969111a0a44b65f5101b481c9a51e1542 100644 (file)
@@ -153,6 +153,11 @@ main(int argc, char *argv[])
     VLOG_WARN("OpenFlow protocol version 0x%02x", OFP_VERSION);
 
     /* Connect to datapath. */
+    if (strncmp(s.dp_name, "nl:", 3) && strncmp(s.dp_name, "unix:", 5)
+        && !s.controller_name) {
+        VLOG_WARN("Controller not specified and datapath is not nl: or "
+                  "unix:.  (Did you forget to specify the datapath?)");
+    }
     local_rconn = rconn_create(0, s.max_backoff);
     rconn_connect(local_rconn, s.dp_name);
     switch_status_register_category(switch_status, "local",