vxlan: fdb: allow specifying multiple destinations for zero MAC
authorMike Rapoport <mike.rapoport@ravellosystems.com>
Tue, 25 Jun 2013 13:01:56 +0000 (16:01 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 25 Jun 2013 16:31:40 +0000 (09:31 -0700)
The zero MAC entry in the fdb is used as default destination. With
multiple default destinations it is possible to use vxlan in
environments that disable multicast on the infrastructure level, e.g.
public clouds.

Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/vxlan.c

index c182520..3e75f97 100644 (file)
@@ -458,7 +458,8 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan,
                        notify = 1;
                }
                if ((flags & NLM_F_APPEND) &&
-                   is_multicast_ether_addr(f->eth_addr)) {
+                   (is_multicast_ether_addr(f->eth_addr) ||
+                    is_zero_ether_addr(f->eth_addr))) {
                        int rc = vxlan_fdb_append(f, ip, port, vni, ifindex);
 
                        if (rc < 0)