From e24bd9bcb7148f670737a9784dba07e132efd110 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 23 Sep 2008 15:47:03 -0700 Subject: [PATCH] Disable STP in secchan by default (but let --stp enable it). --- secchan/secchan.8.in | 8 +++++--- secchan/secchan.c | 9 ++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/secchan/secchan.8.in b/secchan/secchan.8.in index c7e8751a..95d6feb4 100644 --- a/secchan/secchan.8.in +++ b/secchan/secchan.8.in @@ -326,9 +326,11 @@ basis. In particular, if the socket buffer of the monitoring connection fills up, some messages will be lost. .TP -\fB--no-stp\fR -Disable implementation of IEEE 802.1D Spanning Tree Protocol at the -switch. +\fB--stp\fR, \fB--no-stp\fR +Enable or disable implementation of IEEE 802.1D Spanning Tree Protocol +at the switch. The default is \fB--no-stp\fR in this distribution, +because bugs in the STP implementation are still being worked out. +The default will change to \fB--stp\fR at some point in the future. .TP \fB-p\fR, \fB--private-key=\fIprivkey.pem\fR diff --git a/secchan/secchan.c b/secchan/secchan.c index 2a200254..c7df9ef7 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -2064,6 +2064,7 @@ parse_options(int argc, char *argv[], struct settings *s) OPT_RATE_LIMIT, OPT_BURST_LIMIT, OPT_BOOTSTRAP_CA_CERT, + OPT_STP, OPT_NO_STP }; static struct option long_options[] = { @@ -2077,6 +2078,7 @@ parse_options(int argc, char *argv[], struct settings *s) {"monitor", required_argument, 0, 'm'}, {"rate-limit", optional_argument, 0, OPT_RATE_LIMIT}, {"burst-limit", required_argument, 0, OPT_BURST_LIMIT}, + {"stp", no_argument, 0, OPT_STP}, {"no-stp", no_argument, 0, OPT_NO_STP}, {"detach", no_argument, 0, 'D'}, {"force", no_argument, 0, 'f'}, @@ -2104,7 +2106,7 @@ parse_options(int argc, char *argv[], struct settings *s) s->update_resolv_conf = true; s->rate_limit = 0; s->burst_limit = 0; - s->enable_stp = true; + s->enable_stp = false; for (;;) { int c; @@ -2179,6 +2181,10 @@ parse_options(int argc, char *argv[], struct settings *s) } break; + case OPT_STP: + s->enable_stp = true; + break; + case OPT_NO_STP: s->enable_stp = false; break; @@ -2337,6 +2343,7 @@ usage(void) " (a passive OpenFlow connection method)\n" " -m, --monitor=METHOD copy traffic to/from kernel to METHOD\n" " (a passive OpenFlow connection method)\n" + " --stp enable 802.1D Spanning Tree Protocol\n" " --no-stp disable 802.1D Spanning Tree Protocol\n" "\nRate-limiting of \"packet-in\" messages to the controller:\n" " --rate-limit[=PACKETS] max rate, in packets/s (default: 1000)\n" -- 2.30.2