[ovs-dev] [PATCH 13/17] rstp-state-machines: fix rcv_info().
Jarno Rajahalme
jrajahalme at nicira.com
Fri Nov 14 22:17:37 UTC 2014
Series pushed to master up to this patch.
Thanks!
Jarno
On Nov 13, 2014, at 3:59 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
> Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
>
> Thanks!
>
> On Nov 6, 2014, at 7:31 AM, Daniele Venturino <daniele.venturino at m3s.it> wrote:
>
>> A Config BPDU always conveys a Designated Port Role.
>>
>> Signed-off-by: Daniele Venturino <daniele.venturino at m3s.it>
>> ---
>> lib/rstp-state-machines.c | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/rstp-state-machines.c b/lib/rstp-state-machines.c
>> index 13abec0..516093f 100644
>> --- a/lib/rstp-state-machines.c
>> +++ b/lib/rstp-state-machines.c
>> @@ -1026,8 +1026,13 @@ rcv_info(struct rstp_port *p)
>>
>> cp = compare_rstp_priority_vectors(&p->msg_priority, &p->port_priority);
>> ct = rstp_times_equal(&p->port_times, &p->msg_times);
>> - role =
>> - (p->received_bpdu_buffer.flags & ROLE_FLAG_MASK) >> ROLE_FLAG_SHIFT;
>> + /* Configuration BPDU conveys a Designated Port Role. */
>> + if (p->received_bpdu_buffer.bpdu_type == CONFIGURATION_BPDU) {
>> + role = PORT_DES;
>> + } else {
>> + role =
>> + (p->received_bpdu_buffer.flags & ROLE_FLAG_MASK) >> ROLE_FLAG_SHIFT;
>> + }
>>
>> /* 802.1D-2004 does not report this behaviour.
>> * 802.1Q-2008 says set rcvdTcn. */
>> @@ -1047,9 +1052,7 @@ rcv_info(struct rstp_port *p)
>> * 17.19.22).
>> * NOTE: Configuration BPDU explicitly conveys a Designated Port Role.
>> */
>> - if ((role == PORT_DES
>> - || p->received_bpdu_buffer.bpdu_type == CONFIGURATION_BPDU)
>> - && (cp == SUPERIOR || (cp == SAME && ct == false))) {
>> + if (role == PORT_DES && (cp == SUPERIOR || (cp == SAME && ct == false))) {
>> return SUPERIOR_DESIGNATED_INFO;
>>
>> /* Returns RepeatedDesignatedInfo if:
>> --
>> 1.8.1.2
>>
>
More information about the dev
mailing list