]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Zebra: Remove dependency on rib_bogus_ipv6
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 10 Nov 2015 01:02:26 +0000 (17:02 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 10 Nov 2015 01:02:26 +0000 (17:02 -0800)
rib_bogus_ipv6 was removed upstream.  We need to do the same thing
and ensure that our ipv6 multipath still works

Ticket: CM-8152
Reviewed by: CCR-3775
Testing: Ran all multipath tests

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/rib.h
zebra/zebra_rib.c
zebra/zserv.c

index cd77db4df104de42c01c5b230e5cf43c8c963d9b..ca1e97a3788db75a466baf94266652e5bbe101eb 100644 (file)
@@ -416,9 +416,6 @@ extern struct nexthop *nexthop_ipv6_ifindex_add (struct rib *rib,
 extern struct nexthop *nexthop_ipv6_ifname_add (struct rib *rib,
                                                struct in6_addr *ipv6,
                                                char *ifname);
-extern int
-rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
-                struct in6_addr *gate, unsigned int ifindex, int table);
 
 extern struct zebra_vrf *zebra_vrf_lookup (vrf_id_t vrf_id);
 extern struct zebra_vrf *zebra_vrf_alloc (vrf_id_t);
index 0bb9b581187d808a8f50e992dcd127aba9f4c1a2..78c6c831b5db006bf0ceb5d14b927618286a116e 100644 (file)
@@ -3077,27 +3077,6 @@ static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
 }
 
 
-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)) {
-#if defined (MUSICA) || defined (LINUX)
-    /* IN6_IS_ADDR_V4COMPAT(&p->prefix) */
-    if (p->prefixlen == 96)
-      return 0;
-#endif /* MUSICA */
-    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, u_short instance, int flags, struct prefix_ipv6 *p,
              struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id,
@@ -3131,10 +3110,6 @@ rib_add_ipv6 (int type, u_short instance, 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);
 
index f47d4bdb498594bcf9fc64c9280d21af66656901..cb823a0c19457a8d9ba158a04fa45a8a9159e8c3 100644 (file)
@@ -1485,26 +1485,14 @@ zread_ipv6_add (struct zserv *client, u_short length, vrf_id_t vrf_id)
       for (i = 0; i < max_nh_if; i++)
         {
          if ((i < nh_count) && !IN6_IS_ADDR_UNSPECIFIED (&nexthops[i])) {
-            if ((i < if_count) && ifindices[i]) {
-              if (rib_bogus_ipv6 (rib->type, &p, &nexthops[i], ifindices[i], 0)) {
-                continue;
-              }
+            if ((i < if_count) && ifindices[i])
               nexthop_ipv6_ifindex_add (rib, &nexthops[i], ifindices[i]);
-            }
-            else {
-              if (rib_bogus_ipv6 (rib->type, &p, &nexthops[i], 0, 0)) {
-                continue;
-              }
+            else
              nexthop_ipv6_add (rib, &nexthops[i]);
-            }
           }
           else {
-            if ((i < if_count) && ifindices[i]) {
-              if (rib_bogus_ipv6 (rib->type, &p, NULL, ifindices[i], 0)) {
-                continue;
-              }
+            if ((i < if_count) && ifindices[i])
              nexthop_ifindex_add (rib, ifindices[i]);
-           }
           }
        }
     }