From: dv1tas Date: Wed, 29 May 2013 12:29:03 +0000 (+0000) Subject: If unknown port role is received in RSTP version, treat the RSTP BPDU as a STP Config... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8841c70ef931995f7722810394f6111e94f62a9;p=people%2Fms%2Fmstpd.git If unknown port role is received in RSTP version, treat the RSTP BPDU as a STP Config BPDU instead and set the role to be designated role Ixia RSTP ANVL Failure: >> RSTP-1.2 Tue Apr 30 13:28:03 2013: TEST_DESCRIPTION Quick test to verify that DUT transmits RST BPDU from each port. The Unknown value of Port Role cannot be generated by a valid implementation; however, this value is accepted on receipt. (NOTE: The DUT will treat this RST-BPDU as a Configuration BPDU) (Test to verify that the incoming RST BPDU with Unknown Port role plays a role in the calculation of Active Spanning Tree) Tue Apr 30 13:28:03 2013: TEST_REFERENCE NEGATIVE IEEE Std 802.1D-2004 S9.2.9 Page 61 Verification: DUT: Treat the received RST BPDU as CONFIG BPDU DUT: Select B1 as Root Bridge ANVL: Listen (for upto 3 * seconds) on DUT: Send RST BPDU Root Identifier field set to B1 Failure: ! Received RST BPDU doesn't contain expected ! Root Indentifier : 0 / 02:02:00:00:00:01Tue Apr 30 13:28:13 2013: Signed-off-by: Satish Ashok Signed-off-by: Vitalii Demianets git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@40 fbe50366-0c72-4402-a84b-5d246361dba7 --- diff --git a/mstp.c b/mstp.c index d2bfc7b..cc2c8c0 100644 --- a/mstp.c +++ b/mstp.c @@ -1631,6 +1631,25 @@ static port_info_t rcvInfo(per_tree_port_t *ptp) case encodedRoleDesignated: roleIsDesignated = true; break; + case encodedRoleMaster: + /* 802.1D-2004 S9.2.9 P61. The Unknown value of Port Role + * cannot be generated by a valid implementation; however, + * this value is accepted on receipt. roleMaster in MSTP is + * roleUnknown in RSTP. + * NOTE.If the Unknown value of the Port Role parameter is + * received, the state machines will effectively treat the RST + * BPDU as if it were a Configuration BPDU + */ + if(protoRSTP == b->protocolVersion) + { + roleIsDesignated = true; + break; + } + else + { + return OtherInfo; + } + break; default: return OtherInfo; }