dpif-netdev: Also allow "dummy" netdevs in a dpif-netdev.
authorBen Pfaff <blp@nicira.com>
Thu, 18 Aug 2011 18:17:29 +0000 (11:17 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Sep 2011 18:46:09 +0000 (11:46 -0700)
I've always intended this to work, but either I never tested it or the
support rotted.

This will soon be used in some tests that I will add.

lib/dpif-netdev.c

index b48be86173c2c486de1948164209c042cc453b40..359c80b7ffaf5a73b47ce1def2d4eedb374bc8ed 100644 (file)
@@ -336,7 +336,7 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
     int error;
 
     /* XXX reject devices already in some dp_netdev. */
-    if (type[0] == '\0' || !strcmp(type, "system")) {
+    if (type[0] == '\0' || !strcmp(type, "system") || !strcmp(type, "dummy")) {
         internal = false;
     } else if (!strcmp(type, "internal")) {
         internal = true;