|
|
049c96 |
From 1ae6a8011c996122c66a9ea791a7540e8f541b1c Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Wed, 3 Aug 2016 13:31:51 +0200
|
|
|
049c96 |
Subject: [PATCH] Revert "Allow specifying bridge port STP state by name rather
|
|
|
049c96 |
than number."
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1288042
|
|
|
049c96 |
|
|
|
049c96 |
This reverts commit a5087426d103b65fcfd85dc0f71c5bedc3a23148.
|
|
|
049c96 |
---
|
|
|
049c96 |
bridge/link.c | 14 +-------------
|
|
|
049c96 |
man/man8/bridge.8 | 4 +---
|
|
|
049c96 |
2 files changed, 2 insertions(+), 16 deletions(-)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/bridge/link.c b/bridge/link.c
|
|
|
049c96 |
index 861100d..19d0642 100644
|
|
|
049c96 |
--- a/bridge/link.c
|
|
|
049c96 |
+++ b/bridge/link.c
|
|
|
049c96 |
@@ -289,19 +289,7 @@ static int brlink_modify(int argc, char **argv)
|
|
|
049c96 |
priority = atoi(*argv);
|
|
|
049c96 |
} else if (strcmp(*argv, "state") == 0) {
|
|
|
049c96 |
NEXT_ARG();
|
|
|
049c96 |
- char *endptr;
|
|
|
049c96 |
- size_t nstates = sizeof(port_states) / sizeof(*port_states);
|
|
|
049c96 |
- state = strtol(*argv, &endptr, 10);
|
|
|
049c96 |
- if (!(**argv != '\0' && *endptr == '\0')) {
|
|
|
049c96 |
- for (state = 0; state < nstates; state++)
|
|
|
049c96 |
- if (strcmp(port_states[state], *argv) == 0)
|
|
|
049c96 |
- break;
|
|
|
049c96 |
- if (state == nstates) {
|
|
|
049c96 |
- fprintf(stderr,
|
|
|
049c96 |
- "Error: invalid STP port state\n");
|
|
|
049c96 |
- exit(-1);
|
|
|
049c96 |
- }
|
|
|
049c96 |
- }
|
|
|
049c96 |
+ state = atoi(*argv);
|
|
|
049c96 |
} else if (strcmp(*argv, "hwmode") == 0) {
|
|
|
049c96 |
NEXT_ARG();
|
|
|
049c96 |
flags = BRIDGE_FLAGS_SELF;
|
|
|
049c96 |
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8
|
|
|
049c96 |
index 3cda7d6..4f48546 100644
|
|
|
049c96 |
--- a/man/man8/bridge.8
|
|
|
049c96 |
+++ b/man/man8/bridge.8
|
|
|
049c96 |
@@ -204,9 +204,7 @@ droot port selectio algorithms.
|
|
|
049c96 |
.TP
|
|
|
049c96 |
.BI state " STATE "
|
|
|
049c96 |
the operation state of the port. This is primarily used by user space STP/RSTP
|
|
|
049c96 |
-implementation. One may enter a lowercased port state name, or one of the
|
|
|
049c96 |
-numbers below. Negative inputs are ignored, and unrecognized names return an
|
|
|
049c96 |
-error.
|
|
|
049c96 |
+implementation. The following is a list of valid values:
|
|
|
049c96 |
|
|
|
049c96 |
.B 0
|
|
|
049c96 |
- port is DISABLED. Make this port completely inactive.
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|