zebra: Remove HAVE_IPV6 from rib.h and zebra_rib.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2015-10-21 22:46:36 -04:00
parent c0551cbbaf
commit 6ea317e85c
3 changed files with 0 additions and 25 deletions

View File

@ -27,9 +27,7 @@
union g_addr { union g_addr {
struct in_addr ipv4; struct in_addr ipv4;
#ifdef HAVE_IPV6
struct in6_addr ipv6; struct in6_addr ipv6;
#endif /* HAVE_IPV6 */
}; };
enum nexthop_types_t enum nexthop_types_t

View File

@ -348,7 +348,6 @@ extern int rib_lookup_ipv4_route (struct prefix_ipv4 *, union sockunion *);
#define ZEBRA_RIB_FOUND_CONNECTED 2 #define ZEBRA_RIB_FOUND_CONNECTED 2
#define ZEBRA_RIB_NOTFOUND 3 #define ZEBRA_RIB_NOTFOUND 3
#ifdef HAVE_IPV6
extern struct nexthop *nexthop_ipv6_add (struct rib *, struct in6_addr *); extern struct nexthop *nexthop_ipv6_add (struct rib *, struct in6_addr *);
extern struct nexthop *nexthop_ipv6_ifindex_add (struct rib *rib, extern struct nexthop *nexthop_ipv6_ifindex_add (struct rib *rib,
struct in6_addr *ipv6, unsigned int ifindex); struct in6_addr *ipv6, unsigned int ifindex);
@ -358,7 +357,6 @@ extern struct nexthop *nexthop_ipv6_ifname_add (struct rib *rib,
extern int extern int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p, rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, int table); struct in6_addr *gate, unsigned int ifindex, int table);
#endif /* HAVE_IPV6 */
extern struct vrf *vrf_lookup (u_int32_t); extern struct vrf *vrf_lookup (u_int32_t);
extern struct route_table *vrf_table (afi_t afi, safi_t safi, u_int32_t id); extern struct route_table *vrf_table (afi_t afi, safi_t safi, u_int32_t id);
@ -406,7 +404,6 @@ extern int
static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname, static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
u_short tag, u_char distance, u_int32_t vrf_id); u_short tag, u_char distance, u_int32_t vrf_id);
#ifdef HAVE_IPV6
extern int extern int
rib_add_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p, 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, struct in6_addr *gate, unsigned int ifindex, u_int32_t vrf_id,
@ -436,8 +433,6 @@ static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
const char *ifname, u_short tag, u_char distance, const char *ifname, u_short tag, u_char distance,
u_int32_t vrf_id); u_int32_t vrf_id);
#endif /* HAVE_IPV6 */
extern int rib_gc_dest (struct route_node *rn); extern int rib_gc_dest (struct route_node *rn);
extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter); extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter);

View File

@ -246,7 +246,6 @@ zebra_check_addr (struct prefix *p)
|| IPV4_LINKLOCAL(addr)) || IPV4_LINKLOCAL(addr))
return 0; return 0;
} }
#ifdef HAVE_IPV6
if (p->family == AF_INET6) if (p->family == AF_INET6)
{ {
if (IN6_IS_ADDR_LOOPBACK (&p->u.prefix6)) if (IN6_IS_ADDR_LOOPBACK (&p->u.prefix6))
@ -254,7 +253,6 @@ zebra_check_addr (struct prefix *p)
if (IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6)) if (IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6))
return 0; return 0;
} }
#endif /* HAVE_IPV6 */
return 1; return 1;
} }
@ -455,7 +453,6 @@ nexthop_ipv4_ifindex_ol_add (struct rib *rib, const struct in_addr *ipv4,
return nexthop; return nexthop;
} }
#ifdef HAVE_IPV6
struct nexthop * struct nexthop *
nexthop_ipv6_add (struct rib *rib, struct in6_addr *ipv6) nexthop_ipv6_add (struct rib *rib, struct in6_addr *ipv6)
{ {
@ -501,7 +498,6 @@ nexthop_ipv6_ifindex_add (struct rib *rib, struct in6_addr *ipv6,
return nexthop; return nexthop;
} }
#endif /* HAVE_IPV6 */
struct nexthop * struct nexthop *
nexthop_blackhole_add (struct rib *rib) nexthop_blackhole_add (struct rib *rib)
@ -757,7 +753,6 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
return 0; return 0;
} }
#ifdef HAVE_IPV6
/* If force flag is not set, do not modify falgs at all for uninstall /* If force flag is not set, do not modify falgs at all for uninstall
the route from FIB. */ the route from FIB. */
static int static int
@ -947,7 +942,6 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
} }
return 0; return 0;
} }
#endif /* HAVE_IPV6 */
struct rib * struct rib *
rib_match_ipv4 (struct in_addr addr) rib_match_ipv4 (struct in_addr addr)
@ -1132,7 +1126,6 @@ rib_lookup_ipv4_route (struct prefix_ipv4 *p, union sockunion * qgate)
return ZEBRA_RIB_NOTFOUND; return ZEBRA_RIB_NOTFOUND;
} }
#ifdef HAVE_IPV6
struct rib * struct rib *
rib_match_ipv6 (struct in6_addr *addr) rib_match_ipv6 (struct in6_addr *addr)
{ {
@ -1194,7 +1187,6 @@ rib_match_ipv6 (struct in6_addr *addr)
} }
return NULL; return NULL;
} }
#endif /* HAVE_IPV6 */
#define RIB_SYSTEM_ROUTE(R) \ #define RIB_SYSTEM_ROUTE(R) \
((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT) ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
@ -1259,7 +1251,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib,
else else
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
break; break;
#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6:
family = AFI_IP6; family = AFI_IP6;
if (nexthop_active_ipv6 (rib, nexthop, set, rn)) if (nexthop_active_ipv6 (rib, nexthop, set, rn))
@ -1287,7 +1278,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib,
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
} }
break; break;
#endif /* HAVE_IPV6 */
case NEXTHOP_TYPE_BLACKHOLE: case NEXTHOP_TYPE_BLACKHOLE:
SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
break; break;
@ -1410,11 +1400,9 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, int update)
else else
ret = kernel_add_ipv4 (&rn->p, rib); ret = kernel_add_ipv4 (&rn->p, rib);
break; break;
#ifdef HAVE_IPV6
case AF_INET6: case AF_INET6:
ret = kernel_add_ipv6 (&rn->p, rib); ret = kernel_add_ipv6 (&rn->p, rib);
break; break;
#endif /* HAVE_IPV6 */
} }
/* This condition is never met, if we are using rt_socket.c */ /* This condition is never met, if we are using rt_socket.c */
@ -1444,11 +1432,9 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
case AF_INET: case AF_INET:
ret = kernel_delete_ipv4 (&rn->p, rib); ret = kernel_delete_ipv4 (&rn->p, rib);
break; break;
#ifdef HAVE_IPV6
case AF_INET6: case AF_INET6:
ret = kernel_delete_ipv6 (&rn->p, rib); ret = kernel_delete_ipv6 (&rn->p, rib);
break; break;
#endif /* HAVE_IPV6 */
} }
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing)) for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
@ -1886,10 +1872,8 @@ meta_queue_process_complete (struct work_queue *dummy)
{ {
zebra_evaluate_rnh(0, AF_INET, 0, RNH_NEXTHOP_TYPE, NULL); zebra_evaluate_rnh(0, AF_INET, 0, RNH_NEXTHOP_TYPE, NULL);
zebra_evaluate_rnh(0, AF_INET, 0, RNH_IMPORT_CHECK_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_NEXTHOP_TYPE, NULL);
zebra_evaluate_rnh(0, AF_INET6, 0, RNH_IMPORT_CHECK_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 /* Dispatch the meta queue by picking, processing and unlocking the next RN from
@ -3139,7 +3123,6 @@ static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
} }
#ifdef HAVE_IPV6
int int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p, rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, int table) struct in6_addr *gate, unsigned int ifindex, int table)
@ -3889,7 +3872,6 @@ static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
return 1; return 1;
} }
#endif /* HAVE_IPV6 */
/* RIB update function. */ /* RIB update function. */
void void