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]
Message-ID: <20110812091909.712fa36e@nehalam.ftrdhcpuser.net>
Date:	Fri, 12 Aug 2011 09:19:09 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Ulrich Weber <ulrich.weber@...hos.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: bridge: accept bridge own MAC address as local

On Fri, 12 Aug 2011 13:30:24 +0200
Ulrich Weber <ulrich.weber@...hos.com> wrote:

> bridge: accept bridge own MAC address as local
> if MAC address of bridge is manually set (BR_SET_MAC_ADDR). Otherwise
> only MAC addresses of bridge members will work if manually set.
> 
> Signed-off-by: Ulrich Weber <ulrich.weber@...hos.com>
> ---
>  net/bridge/br_input.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index f06ee39..3adabe3 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -93,7 +93,9 @@ int br_handle_frame_finish(struct sk_buff *skb)
>  			skb2 = skb;
>  
>  		br->dev->stats.multicast++;
> -	} else if ((dst = __br_fdb_get(br, dest)) && dst->is_local) {
> +	} else if ((br->flags & BR_SET_MAC_ADDR &&
> +		    !compare_ether_addr(br->bridge_id.addr, dest)) ||
> +		   ((dst = __br_fdb_get(br, dest)) && dst->is_local)) {
>  		skb2 = skb;
>  		/* Do not forward the packet since it's local. */
>  		skb = NULL;

A cleaner way to do this would be better to put a local entry
in the forwarding database when mac address is manually set.
Then there would not be special case code.
--
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