- int rv = sixrd_add_tunnel(&ip6_prefix, ip6_prefix_len, &ip4_prefix,
+ ip4_fib_index = fib_table_find(FIB_PROTOCOL_IP4, ip4_table_id);
+ ip6_fib_index = fib_table_find(FIB_PROTOCOL_IP6, ip6_table_id);
+
+ if (~0 == ip4_fib_index)
+ {
+ error = clib_error_return(0, "No such IP4 table %d", ip4_table_id);
+ rv = VNET_API_ERROR_NO_SUCH_FIB;
+ }
+ else if (~0 == ip6_fib_index)
+ {
+ error = clib_error_return(0, "No such IP6 table %d", ip6_table_id);
+ rv = VNET_API_ERROR_NO_SUCH_FIB;
+ }
+ else
+ {
+ rv = sixrd_add_tunnel(&ip6_prefix, ip6_prefix_len, &ip4_prefix,