From 33df4bb219d6c5b972877434c57fa85543dc8a5e Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 27 Jul 2017 18:01:12 -0300 Subject: [PATCH] zebra: accept static v6 routes with non-existent nexthop interfaces We don't need to enforce that the interface exists because the route can be activated later once the interface becomes available. We already do this for IPv4 routes and IPv6 routes with both a nexthop address and a nexthop interface. Signed-off-by: Renato Westphal --- zebra/zebra_vty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 941090171a..a79d8d71b4 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2151,9 +2151,9 @@ static int static_ipv6_func(struct vty *vty, int add_cmd, const char *dest_str, if (!ifp) { vty_out(vty, "%% Malformed Interface name %s\n", ifname); - return CMD_WARNING_CONFIG_FAILED; - } - ifindex = ifp->ifindex; + ifindex = IFINDEX_DELETED; + } else + ifindex = ifp->ifindex; } else { if (ret == 1) { type = STATIC_IPV6_GATEWAY; -- 2.39.5