mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
821f1b21ca
This patch adds a new bridge port flag BR_NEIGH_SUPPRESS to suppress arp and nd flood on bridge ports. It implements rfc7432, section 10. https://tools.ietf.org/html/rfc7432#section-10 for ethernet VPN deployments. It is similar to the existing BR_PROXYARP* flags but has a few semantic differences to conform to EVPN standard. Unlike the existing flags, this new flag suppresses flood of all neigh discovery packets (arp and nd) to tunnel ports. Supports both vlan filtering and non-vlan filtering bridges. In case of EVPN, it is mainly used to avoid flooding of arp and nd packets to tunnel ports like vxlan. This patch adds netlink and sysfs support to set this bridge port flag. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
33 lines
830 B
C
33 lines
830 B
C
/*
|
|
* Handle bridge arp/nd proxy/suppress
|
|
*
|
|
* Copyright (C) 2017 Cumulus Networks
|
|
* Copyright (c) 2017 Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
*
|
|
* Authors:
|
|
* Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include "br_private.h"
|
|
|
|
void br_recalculate_neigh_suppress_enabled(struct net_bridge *br)
|
|
{
|
|
struct net_bridge_port *p;
|
|
bool neigh_suppress = false;
|
|
|
|
list_for_each_entry(p, &br->port_list, list) {
|
|
if (p->flags & BR_NEIGH_SUPPRESS) {
|
|
neigh_suppress = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
br->neigh_suppress_enabled = neigh_suppress;
|
|
}
|