]> git.proxmox.com Git - mirror_ovs.git/commitdiff
Revert "netdev: do not allow devices to be opened with conflicting types"
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Tue, 16 Aug 2016 13:27:32 +0000 (10:27 -0300)
committerDaniele Di Proietto <diproiettod@vmware.com>
Tue, 16 Aug 2016 17:37:20 +0000 (10:37 -0700)
This reverts commit d2fa6c676a13e86acc7f17261b2d87484f625d45.

When doing a restart, the routing table will open ports as system, which
prevents internal ports to be opened with the right type. That causes failures
in creating the ports.

We should revisit this patch after finding a proper fix on the routing table
layer.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/netdev.c

index 5cf8bbbca32c74e010bc23eaf0511b2dfd77294b..10f2d0f0355d41f01d045f12253292830a1c724f 100644 (file)
@@ -339,8 +339,7 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp)
     if (!netdev) {
         struct netdev_registered_class *rc;
 
-        type = type && type[0] ? type : "system";
-        rc = netdev_lookup_class(type);
+        rc = netdev_lookup_class(type && type[0] ? type : "system");
         if (rc && ovs_refcount_try_ref_rcu(&rc->refcnt)) {
             netdev = rc->class->alloc();
             if (netdev) {
@@ -377,11 +376,6 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp)
                       name, type);
             error = EAFNOSUPPORT;
         }
-    } else if (type && strcmp(type, netdev_get_type(netdev))) {
-        VLOG_WARN("trying to create netdev %s of different type %s,"
-                  " already is %s\n",
-                  name, type, netdev_get_type(netdev));
-        error = EEXIST;
     } else {
         error = 0;
     }