State of bridge STP port are now case insensitive
Improve use experience Signed-off-by: Bastien Roucariès <rouca@debian.org> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
498883a00f
commit
8d5d91fd58
|
|
@ -378,7 +378,7 @@ static int brlink_modify(int argc, char **argv)
|
||||||
state = strtol(*argv, &endptr, 10);
|
state = strtol(*argv, &endptr, 10);
|
||||||
if (!(**argv != '\0' && *endptr == '\0')) {
|
if (!(**argv != '\0' && *endptr == '\0')) {
|
||||||
for (state = 0; state < nstates; state++)
|
for (state = 0; state < nstates; state++)
|
||||||
if (strcmp(port_states[state], *argv) == 0)
|
if (strcasecmp(port_states[state], *argv) == 0)
|
||||||
break;
|
break;
|
||||||
if (state == nstates) {
|
if (state == nstates) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
|
|
||||||
|
|
@ -293,29 +293,29 @@ droot port selectio algorithms.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI state " STATE "
|
.BI state " STATE "
|
||||||
the operation state of the port. Except state 0 (disabled),
|
the operation state of the port. Except state 0 (disable STP or BPDU filter feature),
|
||||||
this is primarily used by user space STP/RSTP
|
this is primarily used by user space STP/RSTP
|
||||||
implementation. One may enter a lowercased port state name, or one of the
|
implementation. One may enter port state name (case insensitive), or one of the
|
||||||
numbers below. Negative inputs are ignored, and unrecognized names return an
|
numbers below. Negative inputs are ignored, and unrecognized names return an
|
||||||
error.
|
error.
|
||||||
|
|
||||||
.B 0
|
.B 0
|
||||||
- port is in
|
- port is in STP
|
||||||
.B DISABLED
|
.B DISABLED
|
||||||
state. Make this port completely inactive. This is also called
|
state. Make this port completely inactive for STP. This is also called
|
||||||
BPDU filter and could be used to disable STP on an untrusted port, like
|
BPDU filter and could be used to disable STP on an untrusted port, like
|
||||||
a leaf virtual devices.
|
a leaf virtual devices.
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
.B 1
|
.B 1
|
||||||
- STP
|
- port is in STP
|
||||||
.B LISTENING
|
.B LISTENING
|
||||||
state. Only valid if STP is enabled on the bridge. In this
|
state. Only valid if STP is enabled on the bridge. In this
|
||||||
state the port listens for STP BPDUs and drops all other traffic frames.
|
state the port listens for STP BPDUs and drops all other traffic frames.
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
.B 2
|
.B 2
|
||||||
- STP
|
- port is in STP
|
||||||
.B LEARNING
|
.B LEARNING
|
||||||
state. Only valid if STP is enabled on the bridge. In this
|
state. Only valid if STP is enabled on the bridge. In this
|
||||||
state the port will accept traffic only for the purpose of updating MAC
|
state the port will accept traffic only for the purpose of updating MAC
|
||||||
|
|
@ -323,13 +323,13 @@ address tables.
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
.B 3
|
.B 3
|
||||||
- STP
|
- port is in STP
|
||||||
.B FORWARDING
|
.B FORWARDING
|
||||||
state. Port is fully active.
|
state. Port is fully active.
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
.B 4
|
.B 4
|
||||||
- STP
|
- port is in STP
|
||||||
.B BLOCKING
|
.B BLOCKING
|
||||||
state. Only valid if STP is enabled on the bridge. This state
|
state. Only valid if STP is enabled on the bridge. This state
|
||||||
is used during the STP election process. In this state, port will only process
|
is used during the STP election process. In this state, port will only process
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue