]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: accept static v6 routes with non-existent nexthop interfaces
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 27 Jul 2017 21:01:12 +0000 (18:01 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 28 Jul 2017 02:39:27 +0000 (23:39 -0300)
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 <renato@opensourcerouting.org>
zebra/zebra_vty.c

index 941090171a896a76f7c96c934384c1c677ac717e..a79d8d71b4768c996b1695207da6ebd56da6e344 100644 (file)
@@ -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;