Fix mac addresses of tunnels/pltaps
[sliver-openvswitch.git] / lib / netdev-tunnel.c
index d2318db..dec5cf8 100644 (file)
@@ -89,15 +89,15 @@ static int
 netdev_tunnel_create(const struct netdev_class *class, const char *name,
                     struct netdev_dev **netdev_devp)
 {
-    static unsigned int n = 0xaa550000;
+    static unsigned int n = 0;
     struct netdev_dev_tunnel *netdev_dev;
     int error;
 
     netdev_dev = xzalloc(sizeof *netdev_dev);
     netdev_dev_init(&netdev_dev->netdev_dev, name, class);
-    netdev_dev->hwaddr[0] = 0x55;
-    netdev_dev->hwaddr[1] = 0xaa;
-    netdev_dev->hwaddr[2] = n >> 24;
+    netdev_dev->hwaddr[0] = 0xfe;
+    netdev_dev->hwaddr[1] = 0xff;
+    netdev_dev->hwaddr[2] = 0xff;
     netdev_dev->hwaddr[3] = n >> 16;
     netdev_dev->hwaddr[4] = n >> 8;
     netdev_dev->hwaddr[5] = n;
@@ -169,11 +169,11 @@ netdev_tunnel_get_config(struct netdev_dev *dev_, struct smap *args)
     struct netdev_dev_tunnel *netdev_dev = netdev_dev_tunnel_cast(dev_);
 
     if (netdev_dev->valid_remote_ip)
-       smap_add(args, "remote_ip",
-           xasprintf(IP_FMT, IP_ARGS(&netdev_dev->remote_addr.sin_addr)));
+       smap_add_format(args, "remote_ip", IP_FMT,
+               IP_ARGS(&netdev_dev->remote_addr.sin_addr));
     if (netdev_dev->valid_remote_port)
-        smap_add(args, "remote_port",
-           xasprintf("%"PRIu16, ntohs(netdev_dev->remote_addr.sin_port)));
+        smap_add_format(args, "remote_port", "%"PRIu16,
+               ntohs(netdev_dev->remote_addr.sin_port));
     return 0;
 }