Subject: Re: [PATCH net-next 3/8] bridge: implement BPDU blocking

From: Stephen Hemminger <[email-masked]>
Date: Wed, 31 Oct 2012 13:57:48 -0700

On Wed, 31 Oct 2012 02:38:46 +0000 (UTC)
Cong Wang <[email-masked]> wrote:

> On Tue, 30 Oct 2012 at 00:57 GMT, Stephen Hemminger <[email-masked]> wrote:
> > --- a/net/bridge/br_stp_bpdu.c	2012-10-29 17:07:08.005982838 -0700
> > +++ b/net/bridge/br_stp_bpdu.c	2012-10-29 17:31:14.327457434 -0700
> > @@ -170,6 +170,13 @@ void br_stp_rcv(const struct stp_proto *
> >  	if (!ether_addr_equal(dest, br->group_addr))
> >  		goto out;
> >  
> > +	if (p->flags & BR_BPDU_GUARD) {
> > +		br_notice(br, "BPDU received on blocked port %u(%s)\n",
> > +			  (unsigned int) p->port_no, p->dev->name);
> 
> net_ratelimit() ?
> 

Not necessary since this causes port of bridge to become disabled;
which blocks all further packets (including STP) until manually reset.