zebra, ripngd: remove ::/64 special-casing
In the 90ies, IPv4 was believed to exist within IPv6, with some kernels
implementing this belief in code... Our code here is keyed to "#ifdef
LINUX", yet no Linux from the past 10 years had this, making the code
completely useless.
FreeBSD 10.0 does in fact have a "::/96 via ::1 dev lo0 reject" route.
IMHO we shouldn't mess with that, the admin can filter as neccessary
anyway.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
[DL: slightly adjusted commit message to remove misunderstanding]
Acked-by: Paul Jakma <paul@jakma.org>
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 2dbbf9e..8c20a7a 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -928,15 +928,6 @@
return;
if (IN6_IS_ADDR_LOOPBACK (&p->prefix))
return;
-#ifdef LINUX
- /* XXX As long as the RIPng redistribution is applied to all the connected
- * routes, one needs to filter the ::/96 prefixes.
- * However it could be a wanted case, it will be removed soon.
- */
- if ((IN6_IS_ADDR_V4COMPAT(&p->prefix)) ||
- (IN6_IS_ADDR_UNSPECIFIED (&p->prefix) && (p->prefixlen == 96)))
- return;
-#endif /* LINUX */
rp = route_node_get (ripng->table, (struct prefix *) p);
rinfo = rp->info;
@@ -1025,15 +1016,6 @@
return;
if (IN6_IS_ADDR_LOOPBACK (&p->prefix))
return;
-#ifdef LINUX
- /* XXX As long as the RIPng redistribution is applied to all the connected
- * routes, one needs to filter the ::/96 prefixes.
- * However it could be a wanted case, it will be removed soon.
- */
- if ((IN6_IS_ADDR_V4COMPAT(&p->prefix)) ||
- (IN6_IS_ADDR_UNSPECIFIED (&p->prefix) && (p->prefixlen == 96)))
- return;
-#endif /* LINUX */
rp = route_node_lookup (ripng->table, (struct prefix *) p);
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 31469ca..0750e6e 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2687,27 +2687,6 @@
}
#ifdef HAVE_IPV6
-static int
-rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
- struct in6_addr *gate, unsigned int ifindex, int table)
-{
- if (type == ZEBRA_ROUTE_CONNECT && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)) {
-#ifdef LINUX
- /* IN6_IS_ADDR_V4COMPAT(&p->prefix) */
- if (p->prefixlen == 96)
- return 0;
-#endif /* LINUX */
- return 1;
- }
- if (type == ZEBRA_ROUTE_KERNEL && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)
- && p->prefixlen == 96 && gate && IN6_IS_ADDR_UNSPECIFIED (gate))
- {
- kernel_delete_ipv6_old (p, gate, ifindex, 0, table);
- return 1;
- }
- return 0;
-}
-
int
rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, u_int32_t vrf_id,
@@ -2734,10 +2713,6 @@
if (type == ZEBRA_ROUTE_BGP && CHECK_FLAG (flags, ZEBRA_FLAG_IBGP))
distance = 200;
- /* Filter bogus route. */
- if (rib_bogus_ipv6 (type, p, gate, ifindex, 0))
- return 0;
-
/* Lookup route node.*/
rn = route_node_get (table, (struct prefix *) p);