netdev-linux: Properly store netdev_dev pointer for RTNL callbacks.
authorJesse Gross <jesse@nicira.com>
Sat, 16 Jan 2010 14:45:45 +0000 (09:45 -0500)
committerJesse Gross <jesse@nicira.com>
Sat, 16 Jan 2010 14:50:35 +0000 (09:50 -0500)
We were storing a struct netdev_dev_linux ** instead of a
netdev_dev_linux * in the cache map.  This prevented the cache
from being invalidated on changes such as link status.

lib/netdev-linux.c

index ca452b5..85ef62a 100644 (file)
@@ -582,7 +582,7 @@ netdev_linux_create_system(const char *name, const char *type UNUSED,
     }
 
     netdev_dev = xzalloc(sizeof *netdev_dev);
-    netdev_dev->shash_node = shash_add(&cache_map, name, &netdev_dev);
+    netdev_dev->shash_node = shash_add(&cache_map, name, netdev_dev);
 
     netdev_dev_init(&netdev_dev->netdev_dev, name, &netdev_linux_class);
     *netdev_devp = &netdev_dev->netdev_dev;