Hello,

In OVS userspace implementation(See below), looks like, given a dest IP,
multiple ARP entries are allowed as long as bridge-names are different for
the same dest IP.
But, is there real scenario where multiple ARP entries for the same dest IP
(because of different bridge-name)?


int
tnl_neigh_lookup(const char br_name[IFNAMSIZ], const struct in6_addr *dst,
                 struct eth_addr *mac)
{
    struct tnl_neigh_entry *neigh;
    int res = ENOENT;
    neigh = tnl_neigh_lookup__(br_name, dst);
    if (neigh) {
        *mac = neigh->mac;
        res = 0;
    }
    return res;
}

static struct tnl_neigh_entry *
tnl_neigh_lookup__(const char br_name[IFNAMSIZ], const struct in6_addr *dst)
{
    struct tnl_neigh_entry *neigh;
    uint32_t hash;
    hash = tnl_neigh_hash(dst);
    CMAP_FOR_EACH_WITH_HASH (neigh, cmap_node, hash, &table) {
        if (ipv6_addr_equals(&neigh->ip, dst) && !strcmp(neigh->br_name,
br_name)) {
            neigh->expires = time_now() + NEIGH_ENTRY_DEFAULT_IDLE_TIME;
            return neigh;
        }
    }
    return NULL;
}
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to