summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichele <michele@openbsd.org>2009-07-31 16:04:34 +0000
committermichele <michele@openbsd.org>2009-07-31 16:04:34 +0000
commit468021608ae5b81a184ccbfdeae3368af2106518 (patch)
treeb0aea5c41b1027c468fb2e1bf8ef0573ae6b3091
parentClean up debug droppings. (diff)
downloadwireguard-openbsd-468021608ae5b81a184ccbfdeae3368af2106518.tar.xz
wireguard-openbsd-468021608ae5b81a184ccbfdeae3368af2106518.zip
Reword the split horizon parameters in the configuration file.
Now the choioses are: none, simple, poisoned. Also make poisoned reverse the default behaviour. Based on a diff by Eugene Yunak, thanks. ok claudio@
-rw-r--r--usr.sbin/ripd/parse.y5
-rw-r--r--usr.sbin/ripd/printconf.c4
-rw-r--r--usr.sbin/ripd/ripd.conf.510
3 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y
index b4427c9a437..837ff7175bd 100644
--- a/usr.sbin/ripd/parse.y
+++ b/usr.sbin/ripd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.24 2009/03/31 21:03:49 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.25 2009/07/31 16:04:34 michele Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -159,7 +159,7 @@ conf_main : SPLIT_HORIZON STRING {
OPT_SPLIT_POISONED);
if (!strcmp($2, "none"))
/* nothing */ ;
- else if (!strcmp($2, "default"))
+ else if (!strcmp($2, "simple"))
conf->options |= OPT_SPLIT_HORIZON;
else if (!strcmp($2, "poisoned"))
conf->options |= OPT_SPLIT_POISONED;
@@ -740,6 +740,7 @@ parse_config(char *filename, int opts)
defs->cost = DEFAULT_COST;
defs->auth_type = AUTH_NONE;
conf->opts = opts;
+ conf->options = OPT_SPLIT_POISONED;
SIMPLEQ_INIT(&conf->redist_list);
if ((file = pushfile(filename, !(conf->opts & RIPD_OPT_NOACTION))) == NULL) {
diff --git a/usr.sbin/ripd/printconf.c b/usr.sbin/ripd/printconf.c
index 4564540f0de..aeabef54fa0 100644
--- a/usr.sbin/ripd/printconf.c
+++ b/usr.sbin/ripd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.5 2009/03/24 19:26:13 michele Exp $ */
+/* $OpenBSD: printconf.c,v 1.6 2009/07/31 16:04:34 michele Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -44,7 +44,7 @@ print_mainconf(struct ripd_conf *conf)
print_redistribute(conf);
if (conf->options & OPT_SPLIT_HORIZON)
- printf("split-horizon default\n");
+ printf("split-horizon simple\n");
else if (conf->options & OPT_SPLIT_POISONED)
printf("split-horizon poisoned\n");
else
diff --git a/usr.sbin/ripd/ripd.conf.5 b/usr.sbin/ripd/ripd.conf.5
index d77609d008c..5dfd27c746e 100644
--- a/usr.sbin/ripd/ripd.conf.5
+++ b/usr.sbin/ripd/ripd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ripd.conf.5,v 1.9 2008/12/17 15:47:30 jmc Exp $
+.\" $OpenBSD: ripd.conf.5,v 1.10 2009/07/31 16:04:34 michele Exp $
.\"
.\" Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
.\" Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -18,7 +18,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: December 17 2008 $
+.Dd $Mdocdate: July 31 2009 $
.Dt RIPD.CONF 5
.Os
.Sh NAME
@@ -122,12 +122,12 @@ will force the route to be not announced.
.It Xo
.Ic split-horizon
.Sm off
-.Po Ic default Ns \&| Ns Ic poisoned Ns \&| Ns
+.Po Ic simple Ns \&| Ns Ic poisoned Ns \&| Ns
.Ic none Pc
.Sm on
.Xc
If set to
-.Ic default ,
+.Ic simple ,
do not redistribute routes to the interface from which they were learned.
If set to
.Ic poisoned ,
@@ -135,7 +135,7 @@ redistribute routes to the interface from which they were learned, by
forcing the metric to infinity.
Both these behaviours can resolve routing loops when a router goes down.
The default is
-.Ic none .
+.Ic poisoned .
.Pp
.It Xo
.Ic triggered-updates