lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Jun 2013 08:48:06 -0400
From:	David Stevens <dlstevens@...ibm.com>
To:	Mike Rapoport <mike.rapoport@...ellosystems.com>
Cc:	netdev@...r.kernel.org, netdev-owner@...r.kernel.org,
	Stephen Hemminger <stephen@...workplumber.org>,
	Thomas Graf <tgraf@...g.ch>
Subject: Re: [RFC] vxlan: convert remote list to list_rcu

Mike Rapoport <mike.rapoport@...ellosystems.com> wrote on 06/04/2013 
05:18:08 AM:

> > But i don't think any of this fdb code relates to the default
> > destination directly, since the generic fdb code does not support
> > default, or any other aggregate matching. VXLAN can define the
> > netlink API for default destinations without affecting anything
> > else, because it is already a per-device feature.
> >
> >                                                         +-DLS
> 
> The only relation is the 'struct vxlan_rdst' which I intended to use
> for default destinations list. So, until there's a consensus about
> remote destinations list in fdb, I cannot continue to work on multiple
> default destinations.

Yes, I agree with that.

I'd expect we could just either add a lock for the default to do
deletes, or overload vxlan_dev->hash_lock and acquire it for deletes
of the default list. [overload probably simplest]

Actually, we could make it an fdb and also have "use" and "updated"
stats that way, and/or use the existing fdb code and add an entry
with MAC "00:00:00:00:00:00" [which is disallowed via the generic
fdb code, so can't be in the fdb table otherwise].

So something like:
        f = vxlan_find_mac(vxlan, mac);
        did_rsc = false;

        if (f && (f->flags & NTF_ROUTER ... {
                ...
        }

        if (f == NULL) {
                f = vxlan_find_mac(vxlan, ALL_ZEROS_MAC);
                if (f == NULL) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^
do these two lines instead of checking "default_dst" for INADDR_ANY

                    if (vxlan->flags & VXLAN_F_L2MISS &&
                        ..
                                vxlan_fdb_miss(...);
                        dev->stats.tx_dropped++;
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
                }
        }

        rc = NETDEV_TX_OK;

and the default will then use the same code as the fdb; can
then remove the NULL dst check in vxlan_xmit_one(), and do
fdb_adds/fdb_append/fdb_del with ALL_ZEROS_MAC as in the fdb,
but get there with a device-specific netlink message. If there
is no default, delete the all-zeros MAC fdb entry, like any
other fdb entry.

Or even extend the generic rtnetlink fdb code to not check
for all-zeros and just treat the all-zeros mac, if there, as a
default destination and use all the same code as fdb to
manage the default.

                                                +-DLS

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ