This diff changes the configuration format of the split-horizon option
of ripd. This involves no behavior change, only configuration.
The old way was to give choice among three possible variants:
split-horizon default
split-horizon poisoned
split-horizon none
And the default behavior was "split-horizon none". This is kind of
confusing, imho, to have "default" which is not default ;)
And this "default" actually just means that split-horizon is on.

With this diff you have the same three options, but with other names:
split-horizon yes
split-horizon poisoned
split-horizon no
And the default is still "no", but there is no "default", which isn't,
actually, the default behavior.

btw, why is "no" default? most networks will only benefit from "yes" or
poison-reverse. It causes troubles only under certain and rare
conditions, but, you know, this conditions will make rip network
almost unusable anyway.


Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ripd/parse.y,v
retrieving revision 1.24
diff -u -p -r1.24 parse.y
--- parse.y     31 Mar 2009 21:03:49 -0000      1.24
+++ parse.y     30 Jul 2009 22:34:31 -0000
@@ -157,9 +157,9 @@ conf_main   : SPLIT_HORIZON STRING {
                        /* clean flags first */
                        conf->options &= ~(OPT_SPLIT_HORIZON |
                            OPT_SPLIT_POISONED);
-                       if (!strcmp($2, "none"))
+                       if (!strcmp($2, "no"))
                                /* nothing */ ;
-                       else if (!strcmp($2, "default"))
+                       else if (!strcmp($2, "yes"))
                                conf->options |= OPT_SPLIT_HORIZON;
                        else if (!strcmp($2, "poisoned"))
                                conf->options |= OPT_SPLIT_POISONED;
Index: printconf.c
===================================================================
RCS file: /cvs/src/usr.sbin/ripd/printconf.c,v
retrieving revision 1.5
diff -u -p -r1.5 printconf.c
--- printconf.c 24 Mar 2009 19:26:13 -0000      1.5
+++ printconf.c 30 Jul 2009 22:34:31 -0000
@@ -44,11 +44,11 @@ print_mainconf(struct ripd_conf *conf)
        print_redistribute(conf);

        if (conf->options & OPT_SPLIT_HORIZON)
-               printf("split-horizon default\n");
+               printf("split-horizon yes\n");
        else if (conf->options & OPT_SPLIT_POISONED)
                printf("split-horizon poisoned\n");
        else
-               printf("split-horizon none\n");
+               printf("split-horizon no\n");

        if (conf->options & OPT_TRIGGERED_UPDATES)
                printf("triggered-updates yes\n");
Index: ripd.conf.5
===================================================================
RCS file: /cvs/src/usr.sbin/ripd/ripd.conf.5,v
retrieving revision 1.9
diff -u -p -r1.9 ripd.conf.5
--- ripd.conf.5 17 Dec 2008 15:47:30 -0000      1.9
+++ ripd.conf.5 30 Jul 2009 22:34:31 -0000
@@ -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
-.Ic none Pc
+.Po Ic yes Ns \&| Ns Ic poisoned Ns \&| Ns
+.Ic no Pc
 .Sm on
 .Xc
 If set to
-.Ic default ,
+.Ic yes ,
 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 fro
 forcing the metric to infinity.
 Both these behaviours can resolve routing loops when a router goes down.
 The default is
-.Ic none .
+.Ic no .
 .Pp
 .It Xo
 .Ic triggered-updates



-- 
The best the little guy can do is what
the little guy does right

Reply via email to