Re: [PATCH 2/2] bridge: message age needs to increase, not decrease.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping? I think this a fairly big problem and should go to Linus
before next release.
Same for bridge: Adjust min age inc for HZ > 256

 Jocke

Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> wrote on 2012/02/28 19:37:11:
>
> commit bridge: send proper message_age in config BPDU
> added this gem:
>   bpdu.message_age = (jiffies - root->designated_age)
>   p->designated_age = jiffies + bpdu->message_age;
> Notice how bpdu->message_age is negated when reassigned to
> bpdu.message_age. This causes message age to decrease breaking the
> STP protocol.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx>
> ---
>  net/bridge/br_stp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
> index 9a8aebd..45331fe 100644
> --- a/net/bridge/br_stp.c
> +++ b/net/bridge/br_stp.c
> @@ -188,7 +188,7 @@ static inline void br_record_config_information(struct net_bridge_port *p,
>     p->designated_cost = bpdu->root_path_cost;
>     p->designated_bridge = bpdu->bridge_id;
>     p->designated_port = bpdu->port_id;
> -   p->designated_age = jiffies + bpdu->message_age;
> +   p->designated_age = jiffies - bpdu->message_age;
>
>     mod_timer(&p->message_age_timer, jiffies
>          + (p->br->max_age - bpdu->message_age));
> --
> 1.7.3.4
>

_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/bridge


[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux