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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080805.014006.00973775.davem@davemloft.net>
Date:	Tue, 05 Aug 2008 01:40:06 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.apana.org.au
Cc:	shemminger@...tta.com, netdev@...r.kernel.org
Subject: Re: bridge: Eliminate unnecessary forward delay

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Tue, 5 Aug 2008 10:12:40 +0800

> On Mon, Aug 04, 2008 at 10:35:34AM -0700, Stephen Hemminger wrote:
> >
> > Same again, this time compile tested...
> > 
> > --- a/net/bridge/br_stp.c	2008-08-04 10:20:21.000000000 -0700
> > +++ b/net/bridge/br_stp.c	2008-08-04 10:29:26.000000000 -0700
> > @@ -368,14 +368,25 @@ static void br_make_blocking(struct net_
> >  /* called under bridge lock */
> >  static void br_make_forwarding(struct net_bridge_port *p)
> >  {
> > -	if (p->state == BR_STATE_BLOCKING) {
> 
> Is it safe to remove this check, especially if the forward delay
> is non-zero?

He's not deleting it as far as I can tell.

The old code is:

	if (p->state == BR_STATE_BLOCKING) {
		if (p->br->stp_enabled == BR_KERNEL_STP)
			p->state = BR_STATE_LISTENING;
		else
			p->state = BR_STATE_LEARNING;

		br_log_state(p);
		mod_timer(&p->forward_delay_timer, jiffies + p->br->forward_delay);
	}

and the new code is:

	struct net_bridge *br = p->br;
 
	if (p->state != BR_STATE_BLOCKING)
		return;

	if (br->forward_delay == 0) {
		p->state = BR_STATE_FORWARDING;
		br_topology_change_detection(br);
		del_timer(&p->forward_delay_timer);
	}
	else if (p->br->stp_enabled == BR_KERNEL_STP)
		p->state = BR_STATE_LISTENING;
	else
		p->state = BR_STATE_LEARNING;

	br_log_state(p);

	if (br->forward_delay != 0)
		mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay);

So when p->state is not BR_STATE_BLOCKING, both before and after this
patch, the function does nothing.

Are your concerns still present?  I'd like to apply this, so let me know.
--
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