lib: netdev-vport improperly initialized route-table.
authorEthan Jackson <ethan@nicira.com>
Mon, 31 Jan 2011 20:02:54 +0000 (12:02 -0800)
committerEthan Jackson <ethan@nicira.com>
Mon, 31 Jan 2011 23:46:18 +0000 (15:46 -0800)
netdev-vport unregistered the routing table in its destroy
function, but registered it in its init function.  This could
cause the routing table to be unregistered when it shouldn't have
been causing segmentation faults.

Bug #4526.

lib/netdev-vport.c

index 436be8c..4da44da 100644 (file)
@@ -193,7 +193,6 @@ static int
 netdev_vport_init(void)
 {
     netdev_vport_tnl_iface_init();
-    route_table_register();
     return 0;
 }
 
@@ -253,6 +252,7 @@ netdev_vport_create(const struct netdev_class *netdev_class, const char *name,
         dev->options = options;
 
         *netdev_devp = &dev->netdev_dev;
+        route_table_register();
     } else {
         ofpbuf_delete(options);
     }