From 6ea317e85ced44d4af56c6a40dce93d5f06d7b74 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 21 Oct 2015 22:46:36 -0400 Subject: [PATCH] zebra: Remove HAVE_IPV6 from rib.h and zebra_rib.c Signed-off-by: Donald Sharp --- lib/nexthop.h | 2 -- zebra/rib.h | 5 ----- zebra/zebra_rib.c | 18 ------------------ 3 files changed, 25 deletions(-) diff --git a/lib/nexthop.h b/lib/nexthop.h index e92d97262c..6909775a06 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -27,9 +27,7 @@ union g_addr { struct in_addr ipv4; -#ifdef HAVE_IPV6 struct in6_addr ipv6; -#endif /* HAVE_IPV6 */ }; enum nexthop_types_t diff --git a/zebra/rib.h b/zebra/rib.h index ec29acf2b2..e361365582 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -348,7 +348,6 @@ extern int rib_lookup_ipv4_route (struct prefix_ipv4 *, union sockunion *); #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); @@ -358,7 +357,6 @@ extern struct nexthop *nexthop_ipv6_ifname_add (struct rib *rib, 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); @@ -406,7 +404,6 @@ extern int 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, @@ -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, 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); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index fc34100b7c..8c4a80155b 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -246,7 +246,6 @@ zebra_check_addr (struct prefix *p) || IPV4_LINKLOCAL(addr)) return 0; } -#ifdef HAVE_IPV6 if (p->family == AF_INET6) { 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)) return 0; } -#endif /* HAVE_IPV6 */ return 1; } @@ -455,7 +453,6 @@ nexthop_ipv4_ifindex_ol_add (struct rib *rib, const struct in_addr *ipv4, return nexthop; } -#ifdef HAVE_IPV6 struct nexthop * 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; } -#endif /* HAVE_IPV6 */ struct nexthop * nexthop_blackhole_add (struct rib *rib) @@ -757,7 +753,6 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, 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 @@ -947,7 +942,6 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, } return 0; } -#endif /* HAVE_IPV6 */ struct rib * 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; } -#ifdef HAVE_IPV6 struct rib * rib_match_ipv6 (struct in6_addr *addr) { @@ -1194,7 +1187,6 @@ 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) @@ -1259,7 +1251,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib, 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)) @@ -1287,7 +1278,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib, UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); } break; -#endif /* HAVE_IPV6 */ case NEXTHOP_TYPE_BLACKHOLE: SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); break; @@ -1410,11 +1400,9 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, int update) 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 */ @@ -1444,11 +1432,9 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib) 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)) @@ -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_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 @@ -3139,7 +3123,6 @@ static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname, } -#ifdef HAVE_IPV6 int rib_bogus_ipv6 (int type, struct prefix_ipv6 *p, 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; } -#endif /* HAVE_IPV6 */ /* RIB update function. */ void -- 2.39.5