diff options
Diffstat (limited to 'staticd/static_vty.c')
| -rw-r--r-- | staticd/static_vty.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 05f23f54d1..a18028ed08 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -60,8 +60,6 @@ struct static_route_args { bool bfd_multi_hop; const char *bfd_source; const char *bfd_profile; - - const char *input; }; static int static_route_nb_run(struct vty *vty, struct static_route_args *args) @@ -153,20 +151,9 @@ static int static_route_nb_run(struct vty *vty, struct static_route_args *args) else buf_gate_str = ""; - if (args->gateway == NULL && args->interface_name == NULL) { + if (args->gateway == NULL && args->interface_name == NULL) type = STATIC_BLACKHOLE; - /* If this is blackhole/reject flagged route, then - * specify interface_name with the value of what was really - * entered. - * interface_name will be validated later in NB functions - * to check if we don't create blackhole/reject routes that - * match the real interface names. - * E.g.: `ip route 10.0.0.1/32 bla` will create a blackhole - * route despite the real interface named `bla` exists. - */ - if (args->input) - args->interface_name = args->input; - } else if (args->gateway && args->interface_name) { + else if (args->gateway && args->interface_name) { if (args->afi == AFI_IP) type = STATIC_IPV4_GATEWAY_IFNAME; else @@ -553,8 +540,6 @@ DEFPY_YANG(ip_route_blackhole, "Table to configure\n" "The table number to configure\n") { - int idx_flag = 0; - struct static_route_args args = { .delete = !!no, .afi = AFI_IP, @@ -569,9 +554,6 @@ DEFPY_YANG(ip_route_blackhole, .vrf = vrf, }; - if (flag && argv_find(argv, argc, flag, &idx_flag)) - args.input = argv[idx_flag]->arg; - return static_route_nb_run(vty, &args); } @@ -600,8 +582,6 @@ DEFPY_YANG(ip_route_blackhole_vrf, "Table to configure\n" "The table number to configure\n") { - int idx_flag = 0; - struct static_route_args args = { .delete = !!no, .afi = AFI_IP, @@ -623,9 +603,6 @@ DEFPY_YANG(ip_route_blackhole_vrf, */ assert(args.prefix); - if (flag && argv_find(argv, argc, flag, &idx_flag)) - args.input = argv[idx_flag]->arg; - return static_route_nb_run(vty, &args); } @@ -916,8 +893,6 @@ DEFPY_YANG(ipv6_route_blackhole, "Table to configure\n" "The table number to configure\n") { - int idx_flag = 0; - struct static_route_args args = { .delete = !!no, .afi = AFI_IP6, @@ -932,9 +907,6 @@ DEFPY_YANG(ipv6_route_blackhole, .vrf = vrf, }; - if (flag && argv_find(argv, argc, flag, &idx_flag)) - args.input = argv[idx_flag]->arg; - return static_route_nb_run(vty, &args); } @@ -963,8 +935,6 @@ DEFPY_YANG(ipv6_route_blackhole_vrf, "Table to configure\n" "The table number to configure\n") { - int idx_flag = 0; - struct static_route_args args = { .delete = !!no, .afi = AFI_IP6, @@ -986,9 +956,6 @@ DEFPY_YANG(ipv6_route_blackhole_vrf, */ assert(args.prefix); - if (flag && argv_find(argv, argc, flag, &idx_flag)) - args.input = argv[idx_flag]->arg; - return static_route_nb_run(vty, &args); } |
