]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Changes static route targets drop/reject to blackhole/unreachable.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 27 Nov 2012 01:08:04 +0000 (02:08 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 27 Nov 2012 01:08:04 +0000 (02:08 +0100)
To be consistent with rest of BIRD and Linux. Old names are also
allowed for compatibility.

bird.conf
doc/bird.conf.example
doc/bird.sgml
proto/static/config.Y

index 2d10ef4b290d3f7a9716dec9495e250632b38853..bafd6ea17a9023dc247fd3647ce14e50169c6b7e 100644 (file)
--- a/bird.conf
+++ b/bird.conf
@@ -25,14 +25,14 @@ protocol kernel {
 protocol static {
 #      disabled;
 
-       route fec0:2::/64 reject;
-       route fec0:3::/64 reject;
-       route fec0:4::/64 reject;
+       route fec0:2::/64 blackhole;
+       route fec0:3::/64 unreachable;
+       route fec0:4::/64 prohibit;
 
 #      route 0.0.0.0/0 via 195.113.31.113;
-#      route 62.168.0.0/25 reject;
+#      route 62.168.0.0/25 unreachable;
 #      route 1.2.3.4/32 via 195.113.31.124;
-#      route 10.0.0.0/8 reject;
+#      route 10.0.0.0/8 unreachable;
 #      route 10.1.1.0:255.255.255.0 via 62.168.0.3;
 #      route 10.1.2.0:255.255.255.0 via 62.168.0.3;
 #      route 10.1.3.0:255.255.255.0 via 62.168.0.4;
index 5e07ab5a51092a5413c06eca5c178db00c722b7e..dcc62e29429a44558c8d158f9bb411f3710dfdb2 100644 (file)
@@ -67,8 +67,8 @@ protocol static {
 #      debug { states, routes, filters, interfaces, events, packets };
 #      debug all;
 #      route 0.0.0.0/0 via 198.51.100.13;
-#      route 198.51.100.0/25 reject;
-#      route 10.0.0.0/8 reject;
+#      route 198.51.100.0/25 unreachable;
+#      route 10.0.0.0/8 unreachable;
 #      route 10.1.1.0:255.255.255.0 via 198.51.100.3;
 #      route 10.1.2.0:255.255.255.0 via 198.51.100.3;
 #      route 10.1.3.0:255.255.255.0 via 198.51.100.4;
index d833f82ff5a81fb29521f3ed1128721b933f3fc6..d351cedc1203449dc8ae0cfb2f849d9a2b812b86 100644 (file)
@@ -2733,9 +2733,10 @@ definition of the protocol contains mainly a list of static routes:
        route through an interface to hosts on a directly connected network.
        <tag>route <m/prefix/ recursive <m/ip/</tag> Static recursive route,
        its nexthop depends on a route table lookup for given IP address.
-       <tag>route <m/prefix/ drop|reject|prohibit</tag> Special routes
-       specifying to drop the packet, return it as unreachable or return
-       it as administratively prohibited.
+       <tag>route <m/prefix/ blackhole|unreachable|prohibit</tag> Special routes
+       specifying to silently drop the packet, return it as unreachable or return
+       it as administratively prohibited. First two targets are also known
+       as <cf/drop/ and <cf/reject/.
 
        <tag>check link <m/switch/</tag>
        If set, hardware link states of network interfaces are taken
@@ -2761,7 +2762,7 @@ protocol static {
                via 198.51.100.10 weight 2
                via 198.51.100.20
                via 192.0.2.1;
-       route 203.0.113.0/24 reject;     # Sink route
+       route 203.0.113.0/24 unreachable; # Sink route
        route 10.2.0.0/24 via "arc0";    # Secondary network
 }
 </code>
index f8e84f92fb2668b3e1d8abb5ed33ec0bafdc5343..2d9d4b42b3fb9cc5765af75abfdd4502e989a3f3 100644 (file)
@@ -18,7 +18,7 @@ static struct static_route *this_srt, *this_srt_nh, *last_srt_nh;
 CF_DECLS
 
 CF_KEYWORDS(STATIC, ROUTE, VIA, DROP, REJECT, PROHIBIT, PREFERENCE, CHECK, LINK)
-CF_KEYWORDS(MULTIPATH, WEIGHT, RECURSIVE, IGP, TABLE)
+CF_KEYWORDS(MULTIPATH, WEIGHT, RECURSIVE, IGP, TABLE, BLACKHOLE, UNREACHABLE)
 
 
 CF_GRAMMAR
@@ -86,9 +86,12 @@ stat_route:
       this_srt->dest = RTDX_RECURSIVE;
       this_srt->via = $3;
    }
- | stat_route0 DROP { this_srt->dest = RTD_BLACKHOLE; }
- | stat_route0 REJECT { this_srt->dest = RTD_UNREACHABLE; }
- | stat_route0 PROHIBIT { this_srt->dest = RTD_PROHIBIT; }
+
+ | stat_route0 DROP            { this_srt->dest = RTD_BLACKHOLE; }
+ | stat_route0 REJECT          { this_srt->dest = RTD_UNREACHABLE; }
+ | stat_route0 BLACKHOLE       { this_srt->dest = RTD_BLACKHOLE; }
+ | stat_route0 UNREACHABLE     { this_srt->dest = RTD_UNREACHABLE; }
+ | stat_route0 PROHIBIT                { this_srt->dest = RTD_PROHIBIT; }
  ;
 
 CF_CLI(SHOW STATIC, optsym, [<name>], [[Show details of static protocol]])