Skip to content

Commit

Permalink
rstp-state-machines: fix TCN reception.
Browse files Browse the repository at this point in the history
Set rcdv_tcn and return OTHER_INFO when a
TOPOLOGY_CHANGE_NOTIFICATION_BPDU is received, as required by
802.1Q-2008.

Signed-off-by: Daniele Venturino <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
Daniele Venturino authored and Jarno Rajahalme committed Nov 14, 2014
1 parent 7ccf8d3 commit 11d4d40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/rstp-state-machines.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,14 @@ rcv_info(struct rstp_port *p)
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. */
if (p->received_bpdu_buffer.bpdu_type ==
TOPOLOGY_CHANGE_NOTIFICATION_BPDU) {
p->rcvd_tcn = true;
return OTHER_INFO;
}

/* Returns SuperiorDesignatedInfo if:
* a) The received message conveys a Designated Port Role, and
* 1) The message priority is superior (17.6) to the Port.s port priority
Expand Down

0 comments on commit 11d4d40

Please sign in to comment.