+
+ return 0;
+}
-+
-+/*! --------------- Edge Detection ------------------ !*/
--- /dev/null
+++ b/bgpd/bgp_pgbgp.h
@@ -0,0 +1,286 @@
/* 1. Weight check. */
if (new->attr->extra)
new_weight = new->attr->extra->weight;
-@@ -1554,6 +1562,10 @@ bgp_process_main (struct work_queue *wq,
+@@ -1508,6 +1516,10 @@ bgp_process_main (struct work_queue *wq,
bgp_info_unset_flag (rn, new_select, BGP_INFO_ATTR_CHANGED);
}
/* Check each BGP peer. */
for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
-@@ -1878,6 +1890,11 @@ bgp_update_rsclient (struct peer *rsclie
+@@ -1831,6 +1843,11 @@ bgp_update_rsclient (struct peer *rsclie
/* If the update is implicit withdraw. */
if (ri)
{
ri->uptime = bgp_clock ();
/* Same attribute comes in. */
-@@ -2309,6 +2326,11 @@ bgp_update_main (struct peer *peer, stru
+@@ -2262,6 +2279,11 @@ bgp_update_main (struct peer *peer, stru
/* Increment prefix */
bgp_aggregate_increment (bgp, p, new, afi, safi);
/* Register new BGP information. */
bgp_info_add (rn, new);
-@@ -5648,6 +5670,20 @@ enum bgp_display_type
+@@ -5474,6 +5496,20 @@ enum bgp_display_type
static void
route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo)
{
/* Route status display. */
if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED))
vty_out (vty, "R");
-@@ -6152,6 +6188,7 @@ route_vty_out_detail (struct vty *vty, s
+@@ -5974,6 +6010,7 @@ route_vty_out_detail (struct vty *vty, s
}
\f
#define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,%s r RIB-failure, S Stale, R Removed%s"
#define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s"
#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path%s"
#define BGP_SHOW_DAMP_HEADER " Network From Reuse Path%s"
-@@ -6183,7 +6220,8 @@ enum bgp_show_type
+@@ -6005,7 +6042,8 @@ enum bgp_show_type
bgp_show_type_flap_route_map,
bgp_show_type_flap_neighbor,
bgp_show_type_dampend_paths,
};
static int
-@@ -6350,11 +6388,17 @@ bgp_show_table (struct vty *vty, struct
+@@ -6172,11 +6210,17 @@ bgp_show_table (struct vty *vty, struct
|| CHECK_FLAG (ri->flags, BGP_INFO_HISTORY))
continue;
}
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
-@@ -6432,6 +6476,7 @@ bgp_show (struct vty *vty, struct bgp *b
+@@ -6254,6 +6298,7 @@ bgp_show (struct vty *vty, struct bgp *b
return bgp_show_table (vty, table, &bgp->router_id, type, output_arg);
}
/* Header of detailed BGP route information */
static void
route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
-@@ -11234,6 +11279,64 @@ DEFUN (bgp_damp_set,
+@@ -11823,6 +11868,64 @@ DEFUN (bgp_damp_set,
half, reuse, suppress, max);
}
ALIAS (bgp_damp_set,
bgp_damp_set2_cmd,
"bgp dampening <1-45>",
-@@ -11283,6 +11386,19 @@ DEFUN (show_ip_bgp_dampened_paths,
+@@ -11872,6 +11975,19 @@ DEFUN (show_ip_bgp_dampened_paths,
NULL);
}
DEFUN (show_ip_bgp_flap_statistics,
show_ip_bgp_flap_statistics_cmd,
"show ip bgp flap-statistics",
-@@ -11828,6 +11944,7 @@ bgp_route_init (void)
+@@ -12398,6 +12514,7 @@ bgp_route_init (void)
install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_dampened_paths_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_statistics_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_address_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_cmd);
-@@ -11935,6 +12052,7 @@ bgp_route_init (void)
+@@ -12531,6 +12648,7 @@ bgp_route_init (void)
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_dampened_paths_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_statistics_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_address_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_cmd);
-@@ -12293,6 +12411,10 @@ bgp_route_init (void)
- install_element (BGP_IPV4_NODE, &bgp_damp_set3_cmd);
+@@ -12918,6 +13036,10 @@ bgp_route_init (void)
install_element (BGP_IPV4_NODE, &bgp_damp_unset_cmd);
install_element (BGP_IPV4_NODE, &bgp_damp_unset2_cmd);
-+
+
+ install_element (BGP_NODE, &bgp_pgbgp_cmd);
+ install_element (BGP_NODE, &bgp_pgbgp_arg_cmd);
+ install_element (BGP_NODE, &bgp_pgbgp_unset_cmd);
- }
-
- void
++
+ /* Deprecated AS-Pathlimit commands */
+ install_element (BGP_NODE, &bgp_network_ttl_cmd);
+ install_element (BGP_NODE, &bgp_network_mask_ttl_cmd);
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -1,3 +1,4 @@
/* BGP route type. This can be static, RIP, OSPF, BGP etc. */
u_char type;
-@@ -123,7 +128,7 @@ struct bgp_static
+@@ -120,7 +125,7 @@ struct bgp_static
/* Flags which indicate a route is unuseable in some form */
#define BGP_INFO_UNUSEABLE \
* sense of the additional VALID flag.
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
-@@ -63,6 +63,8 @@ struct bgp_node
+@@ -65,6 +65,8 @@ struct bgp_node
- unsigned int lock;
+ int lock;
+ struct bgp_pgbgp_hist *hist;
+
};
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
-@@ -121,6 +121,7 @@ struct bgp
+@@ -123,6 +123,7 @@ struct bgp
/* BGP Per AF flags */
u_int16_t af_flags[AFI_MAX][SAFI_MAX];
#define BGP_CONFIG_DAMPENING (1 << 0)
struct bgp_table *route[AFI_MAX][SAFI_MAX];
--- a/lib/hash.c
+++ b/lib/hash.c
-@@ -156,6 +156,35 @@ hash_iterate (struct hash *hash,
+@@ -166,6 +166,35 @@ hash_iterate (struct hash *hash,
}
}
hash_clean (struct hash *hash, void (*free_func) (void *))
--- a/lib/hash.h
+++ b/lib/hash.h
-@@ -66,7 +66,8 @@ extern void *hash_release (struct hash *, void *);
+@@ -66,7 +66,8 @@ extern void *hash_release (struct hash *
extern void hash_iterate (struct hash *,
void (*) (struct hash_backet *, void *), void *);