X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=package%2Fquagga%2Fnot-patches%2Fpatches-pgbgp%2F162-bgp_table_wrapper.patch;fp=package%2Fquagga%2Fnot-patches%2Fpatches-pgbgp%2F162-bgp_table_wrapper.patch;h=09157f7297d3486a6e2461fe0e4137ccc90c182f;hp=0000000000000000000000000000000000000000;hb=30b136923fe6a874a4bbd430c83b7d656607931b;hpb=0b111996782aa58aef2891eeccdb8bd9875c27ae diff --git a/package/quagga/not-patches/patches-pgbgp/162-bgp_table_wrapper.patch b/package/quagga/not-patches/patches-pgbgp/162-bgp_table_wrapper.patch new file mode 100644 index 000000000..09157f729 --- /dev/null +++ b/package/quagga/not-patches/patches-pgbgp/162-bgp_table_wrapper.patch @@ -0,0 +1,121 @@ +--- a/bgpd/bgp_pgbgp.c ++++ b/bgpd/bgp_pgbgp.c +@@ -694,7 +694,7 @@ findSuper (struct bgp_table *table, stru + struct bgp_node *matched; + + matched = NULL; +- node = table->top; ++ node = bgp_table_top_nolock (table); + + while (node && node->p.prefixlen < p->prefixlen && + prefix_match (&node->p, p)) +@@ -874,7 +874,8 @@ bgp_pgbgp_clean (struct bgp_table *table + if (changed && rn->info) + { + struct bgp_info *ri = rn->info; +- bgp_process (ri->peer->bgp, rn, rn->table->afi, rn->table->safi); ++ bgp_process (ri->peer->bgp, rn, bgp_node_table (rn)->afi, ++ bgp_node_table (rn)->safi); + } + } + +@@ -1166,7 +1167,8 @@ bgp_pgbgp_rib_updated (struct bgp_node * + struct bgp_info *ri = cur->sub->info; + if (ri && ri->peer && ri->peer->bgp) + bgp_process (ri->peer->bgp, cur->sub, +- cur->sub->table->afi, cur->sub->table->safi); ++ bgp_node_table (cur->sub)->afi, ++ bgp_node_table (cur->sub)->safi); + + } + +@@ -1200,7 +1202,8 @@ bgp_pgbgp_rib_updated (struct bgp_node * + struct bgp_info *ri = cur->sub->info; + if (ri && ri->peer && ri->peer->bgp) + bgp_process (ri->peer->bgp, cur->sub, +- cur->sub->table->afi, cur->sub->table->safi); ++ bgp_node_table (cur->sub)->afi, ++ bgp_node_table (cur->sub)->safi); + } + } + } +@@ -1270,7 +1273,7 @@ bgp_pgbgp_update (struct bgp_info *binfo + struct bgp_node *superhn = NULL; + + // implicit lock from node_get +- superhn = findSuper (rn->table, &rn->p, t_now); ++ superhn = findSuper (bgp_node_table (rn), &rn->p, t_now); + + int newPeer = bgp_pgbgp_updatePeer (binfo, t_now); + bgp_pgbgp_updateOrigin (rn->hist, binfo, at, rn, t_now, newPeer); +@@ -1287,13 +1290,13 @@ bgp_pgbgp_update (struct bgp_info *binfo + // Make sure you don't collect anything that might be in use! + if (t_now >= pgbgp->lastgc + PGBGP_GC_DELTA) + { +- bgp_pgbgp_gc (rn->table); ++ bgp_pgbgp_gc (bgp_node_table (rn)); + pgbgp->lastgc = t_now; + } + + if (t_now >= pgbgp->lastStore + PGBGP_STORE_DELTA) + { +- bgp_pgbgp_store (rn->table); ++ bgp_pgbgp_store (bgp_node_table (rn)); + pgbgp->lastStore = t_now; + } + +@@ -1682,8 +1685,8 @@ bgp_pgbgp_reuseOrigin (struct bgp_pgbgp_ + + // Rerun the decision process? + if (numChanged > 0) +- bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, +- data.rn->table->safi); ++ bgp_process (ri->peer->bgp, data.rn, bgp_node_table (data.rn)->afi, ++ bgp_node_table (data.rn)->safi); + + + /* +@@ -1962,8 +1965,8 @@ UPP_IGNORE: + if (changed) + { + struct bgp_info *ri = supernode->info; +- bgp_process (ri->peer->bgp, supernode, supernode->table->afi, +- supernode->table->safi); ++ bgp_process (ri->peer->bgp, supernode, bgp_node_table (supernode)->afi, ++ bgp_node_table (supernode)->safi); + } + + UPP_DONE: +@@ -1986,8 +1989,8 @@ bgp_pgbgp_reusePrefix (struct bgp_pgbgp_ + + // Rerun the decision process + if (ri != NULL) +- bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, +- data.rn->table->safi); ++ bgp_process (ri->peer->bgp, data.rn, bgp_node_table (data.rn)->afi, ++ bgp_node_table (data.rn)->safi); + + + // Remove the avoid nodes from the super +@@ -2021,8 +2024,8 @@ bgp_pgbgp_reusePrefix (struct bgp_pgbgp_ + + if (numChanged > 0 && ri != NULL) + bgp_process (ri->peer->bgp, data.rnsuper, +- data.rnsuper->table->afi, +- data.rnsuper->table->safi); ++ bgp_node_table (data.rnsuper)->afi, ++ bgp_node_table (data.rnsuper)->safi); + bgp_unlock_node (del->sub); + XFREE (MTYPE_BGP_PGBGP_AVOID, del); + } +@@ -2419,8 +2422,8 @@ bgp_pgbgp_reuseEdge (struct bgp_pgbgp_r_ + } + struct bgp_info *ri = data.rn->info; + if (numChanged > 0 && ri) +- bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, +- data.rn->table->safi); ++ bgp_process (ri->peer->bgp, data.rn, bgp_node_table (data.rn)->afi, ++ bgp_node_table (data.rn)->safi); + + struct bgp_pgbgp_hist *hist = data.rn->hist; + hist->pEdgeReuse = NULL;