summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 330bce77..9851cf44 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2145,6 +2145,14 @@ static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
stable = vrf_static_table (AFI_IP6, SAFI_UNICAST, vrf_id);
if (! stable)
return -1;
+
+ if (!gate &&
+ (type == STATIC_IPV6_GATEWAY || type == STATIC_IPV6_GATEWAY_IFNAME))
+ return -1;
+
+ if (!ifname &&
+ (type == STATIC_IPV6_GATEWAY_IFNAME || type == STATIC_IPV6_IFNAME))
+ return -1;
/* Lookup static route prefix. */
rn = route_node_get (stable, p);