[Rstplib-users] Issue With Link Loss on Admin Non-STP Ports
Status: Alpha
Brought to you by:
ralex
From: <car...@se...> - 2014-07-22 18:57:01
|
Hello, While working with an rstpd implementation which uses rstplib, we found ports with the admin_non_stp flag would not be set back to the forwarding state if they ever lost link. The issue was tracked down to a problem with rolesel.c, where admin_non_stp ports are not set to the "disabled" role when link is lost. The following change was made to correct the issue. >>$ hg diff -p -r 360:b5297bd8fc00 -r 428:7d3ed15b564c rstplib/rolesel.c diff -r b5297bd8fc00 -r 7d3ed15b564c rstplib/rolesel.c --- a/rstplib/rolesel.c Fri Apr 05 14:15:44 2013 -0700 +++ b/rstplib/rolesel.c Wed Jul 16 14:49:44 2014 -0600 @@ -226,8 +226,12 @@ updtRolesBridge (STATE_MACH_T* this) for (port = stpm->ports; port; port = port->next) { if (port->admin_non_stp) { - setRoleSelected ("Non", stpm, port, NonStpPort); - port->forward = port->learn = True; + if (port->infoIs == Disabled) + setRoleSelected ("Dis", stpm, port, DisabledPort); + else { + setRoleSelected ("Non", stpm, port, NonStpPort); + port->forward = port->learn = True; + } continue; } Thanks! Carl |