diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2014-06-28 21:26:36 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-02-14 19:18:51 +0100 |
commit | 86a82e99aa3728d78a1ec65b60a2162914cd7519 (patch) | |
tree | 5eedc1965841fb529c6c5e44511c80f388b90681 | |
parent | 6d6df30386423518b5daef93c2f047b4140f85f4 (diff) | |
download | quagga-86a82e99aa3728d78a1ec65b60a2162914cd7519.tar.bz2 quagga-86a82e99aa3728d78a1ec65b60a2162914cd7519.tar.xz |
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>
-rw-r--r-- | ripngd/ripngd.c | 18 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 25 |
2 files changed, 0 insertions, 43 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 2dbbf9e1..8c20a7a2 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -928,15 +928,6 @@ ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p, 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 @@ ripng_redistribute_delete (int type, int sub_type, struct prefix_ipv6 *p, 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 31469ca7..0750e6eb 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2687,27 +2687,6 @@ static_delete_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate, } #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 @@ rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p, 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); |