diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-09-04 16:09:35 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-09-05 16:50:34 +0200 |
commit | 57a58d777f65d8fec9efe52c3e69c9341694eb69 (patch) | |
tree | a4230942a9859fa37d9c4c8524e20c895b83f9a5 /zebra/zebra_vty.c | |
parent | zebra: display static blackhole routes consistently (diff) | |
download | frr-57a58d777f65d8fec9efe52c3e69c9341694eb69.tar.xz frr-57a58d777f65d8fec9efe52c3e69c9341694eb69.zip |
zebra: accept Null0 again in addition to null0
Restore behavior before commit a830942.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_vty.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 3141782c5..1573646ad 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -165,15 +165,19 @@ static int zebra_static_route(struct vty *vty, afi_t afi, safi_t safi, } } + /* Null0 static route. */ + if ((ifname != NULL) + && (strncasecmp(ifname, "Null0", strlen(ifname)) == 0)) { + bh_type = STATIC_BLACKHOLE_NULL; + ifname = NULL; + } + /* Route flags */ if (flag_str) { switch (flag_str[0]) { case 'r': bh_type = STATIC_BLACKHOLE_REJECT; break; - case 'n': - bh_type = STATIC_BLACKHOLE_NULL; - break; case 'b': bh_type = STATIC_BLACKHOLE_DROP; break; @@ -334,7 +338,8 @@ DEFPY(ip_route, ip_route_cmd, <A.B.C.D/M$prefix|A.B.C.D$prefix A.B.C.D$mask>\ <\ {A.B.C.D$gate|INTERFACE$ifname}\ - |<null0|reject|blackhole>$flag\ + |null0$ifname\ + |<reject|blackhole>$flag\ >\ [{\ tag (1-4294967295)\ @@ -1715,7 +1720,7 @@ static int static_config(struct vty *vty, afi_t afi, safi_t safi, vty_out(vty, " blackhole"); break; case STATIC_BLACKHOLE_NULL: - vty_out(vty, " null0"); + vty_out(vty, " Null0"); break; case STATIC_BLACKHOLE_REJECT: vty_out(vty, " reject"); @@ -1772,7 +1777,8 @@ DEFPY(ipv6_route, "[no] ipv6 route X:X::X:X/M$prefix [from X:X::X:X/M]\ <\ {X:X::X:X$gate|INTERFACE$ifname}\ - |<null0|reject|blackhole>$flag\ + |null0$ifname\ + |<reject|blackhole>$flag\ >\ [{\ tag (1-4294967295)\ |