]> git.ipfire.org Git - people/ms/mstpd.git/commitdiff
If unknown port role is received in RSTP version, treat the RSTP BPDU as a STP Config...
authordv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 29 May 2013 12:29:03 +0000 (12:29 +0000)
committerdv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Wed, 29 May 2013 12:29:03 +0000 (12:29 +0000)
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 <bestBridgeID> B1 as Root Bridge
  ANVL: Listen (for upto 3 * <configBridgeHelloTime> seconds) on <DIface-1>
  DUT: Send RST BPDU
  Root Identifier field set to <bestBridgeID> 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 <sashok@cumulusnetworks.com>
Signed-off-by: Vitalii Demianets <dvitasgs@gmail.com>
git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@40 fbe50366-0c72-4402-a84b-5d246361dba7

mstp.c

diff --git a/mstp.c b/mstp.c
index d2bfc7ba4736bafea53730905c046eca53b4396f..cc2c8c0d5bd01a1d11440e8bd1fc26f8b4d93ce2 100644 (file)
--- 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;
             }