#define ZEBRA_RIB_FOUND_CONNECTED 2
#define ZEBRA_RIB_NOTFOUND 3
-#ifdef HAVE_IPV6
extern struct nexthop *nexthop_ipv6_add (struct rib *, struct in6_addr *);
extern struct nexthop *nexthop_ipv6_ifindex_add (struct rib *rib,
struct in6_addr *ipv6, unsigned int ifindex);
extern int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, int table);
-#endif /* HAVE_IPV6 */
extern struct vrf *vrf_lookup (u_int32_t);
extern struct route_table *vrf_table (afi_t afi, safi_t safi, u_int32_t id);
static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
u_short tag, u_char distance, u_int32_t vrf_id);
-#ifdef HAVE_IPV6
extern int
rib_add_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, u_int32_t vrf_id,
const char *ifname, u_short tag, u_char distance,
u_int32_t vrf_id);
-#endif /* HAVE_IPV6 */
-
extern int rib_gc_dest (struct route_node *rn);
extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter);
|| IPV4_LINKLOCAL(addr))
return 0;
}
-#ifdef HAVE_IPV6
if (p->family == AF_INET6)
{
if (IN6_IS_ADDR_LOOPBACK (&p->u.prefix6))
if (IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6))
return 0;
}
-#endif /* HAVE_IPV6 */
return 1;
}
return nexthop;
}
-#ifdef HAVE_IPV6
struct nexthop *
nexthop_ipv6_add (struct rib *rib, struct in6_addr *ipv6)
{
return nexthop;
}
-#endif /* HAVE_IPV6 */
struct nexthop *
nexthop_blackhole_add (struct rib *rib)
return 0;
}
-#ifdef HAVE_IPV6
/* If force flag is not set, do not modify falgs at all for uninstall
the route from FIB. */
static int
}
return 0;
}
-#endif /* HAVE_IPV6 */
struct rib *
rib_match_ipv4 (struct in_addr addr)
return ZEBRA_RIB_NOTFOUND;
}
-#ifdef HAVE_IPV6
struct rib *
rib_match_ipv6 (struct in6_addr *addr)
{
}
return NULL;
}
-#endif /* HAVE_IPV6 */
#define RIB_SYSTEM_ROUTE(R) \
((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
else
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
break;
-#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
family = AFI_IP6;
if (nexthop_active_ipv6 (rib, nexthop, set, rn))
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
}
break;
-#endif /* HAVE_IPV6 */
case NEXTHOP_TYPE_BLACKHOLE:
SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
break;
else
ret = kernel_add_ipv4 (&rn->p, rib);
break;
-#ifdef HAVE_IPV6
case AF_INET6:
ret = kernel_add_ipv6 (&rn->p, rib);
break;
-#endif /* HAVE_IPV6 */
}
/* This condition is never met, if we are using rt_socket.c */
case AF_INET:
ret = kernel_delete_ipv4 (&rn->p, rib);
break;
-#ifdef HAVE_IPV6
case AF_INET6:
ret = kernel_delete_ipv6 (&rn->p, rib);
break;
-#endif /* HAVE_IPV6 */
}
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
{
zebra_evaluate_rnh(0, AF_INET, 0, RNH_NEXTHOP_TYPE, NULL);
zebra_evaluate_rnh(0, AF_INET, 0, RNH_IMPORT_CHECK_TYPE, NULL);
-#ifdef HAVE_IPV6
zebra_evaluate_rnh(0, AF_INET6, 0, RNH_NEXTHOP_TYPE, NULL);
zebra_evaluate_rnh(0, AF_INET6, 0, RNH_IMPORT_CHECK_TYPE, NULL);
-#endif /* HAVE_IPV6 */
}
/* Dispatch the meta queue by picking, processing and unlocking the next RN from
}
-#ifdef HAVE_IPV6
int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, int table)
return 1;
}
-#endif /* HAVE_IPV6 */
/* RIB update function. */
void