[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171115120452.3b426442@xeon-e3>
Date: Wed, 15 Nov 2017 12:04:52 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Sarah Newman <srn@...mr.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] net: bridge: add max_fdb_count
On Wed, 15 Nov 2017 11:27:07 -0800
Sarah Newman <srn@...mr.com> wrote:
> Current memory and CPU usage for managing bridge fdb entries is unbounded.
> Add a parameter max_fdb_count, controlled from sysfs, which places an upper
> limit on the number of entries. Defaults to 1024.
>
> When max_fdb_count is met or exceeded, whether traffic is sent out a
> given port should depend on its flooding behavior.
>
> This may instead be mitigated by filtering mac address entries in the
> PREROUTING chain of the ebtables nat table, but this is only practical
> when mac addresses are known in advance.
>
> Signed-off-by: Sarah Newman <srn@...mr.com>
Thanks for your patch, I can see how this can be a real
problem, especially for a learning bridge.
There are some details which probably need to be resolved before
this can be applied.
* if the bridge is being DoS attacked by random MAC addresses
then the policy under spam needs to be considered.
Not sure if not inserting the new entry is the best policy.
* The counter probably doesn't need to be unsigned long (64 bit on x86_64)
maybe u32 is enough.
* The bridge attributes in general are controllable both by netlink
and sysfs. It would make sense to do this for max fdb as well.
Also what do the vendors using bridge for L2 offload to switch think?
Many switches need to clone table, and similar limits must be in other
versions. FreeBSD has a limit like this.
Powered by blists - more mailing lists