[packages] quagga: Update to v0.99.18

git-svn-id: svn+ssh://svn.openwrt.org/openwrt@26360 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
acinonyx 2011-03-30 09:27:13 +00:00
parent 7a5d81f357
commit e9c87d05fb
13 changed files with 189 additions and 300 deletions

View File

@ -14,9 +14,9 @@ ifneq ($(CONFIG_QUAGGA_OLD),)
PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68
PATCH_DIR:=./patches-old
else
PKG_VERSION:=0.99.17
PKG_RELEASE:=7
PKG_MD5SUM:=37b9022adca04b03863d2d79787e643f
PKG_VERSION:=0.99.18
PKG_RELEASE:=1
PKG_MD5SUM:=59e306e93a4a1ce16760f20e9075d473
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View File

@ -0,0 +1,22 @@
--- a/lib/command.c
+++ b/lib/command.c
@@ -3056,7 +3056,7 @@ DEFUN (config_logmsg,
if ((level = level_match(argv[0])) == ZLOG_DISABLED)
return CMD_ERR_NO_MATCH;
- zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : ""));
+ zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : ""));
if (message)
XFREE(MTYPE_TMP, message);
return CMD_SUCCESS;
--- a/lib/if.c
+++ b/lib/if.c
@@ -664,7 +664,7 @@ connected_log (struct connected *connect
strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
BUFSIZ - strlen(logbuf));
}
- zlog (NULL, LOG_INFO, logbuf);
+ zlog (NULL, LOG_INFO, "%s", logbuf);
}
/* If two connected address has same prefix return 1. */

View File

@ -0,0 +1,31 @@
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -4327,6 +4327,7 @@ ALIAS_DEPRECATED (no_bgp_network_mask_na
"Specify a BGP backdoor route\n"
"AS-Path hopcount limit attribute\n"
"AS-Pathlimit TTL, in number of AS-Path hops\n")
+#ifdef HAVE_IPV6
ALIAS_DEPRECATED (ipv6_bgp_network,
ipv6_bgp_network_ttl_cmd,
"network X:X::X:X/M pathlimit <0-255>",
@@ -4342,6 +4343,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network,
"IPv6 prefix <network>/<length>\n"
"AS-Path hopcount limit attribute\n"
"AS-Pathlimit TTL, in number of AS-Path hops\n")
+#endif /* HAVE_IPV6 */
/* Aggreagete address:
@@ -12133,9 +12135,11 @@ bgp_route_init (void)
install_element (BGP_IPV4M_NODE, &no_bgp_network_backdoor_ttl_cmd);
install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd);
install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd);
-
+
+#ifdef HAVE_IPV6
install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd);
install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd);
+#endif
}
void

View File

@ -0,0 +1,91 @@
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -114,6 +114,9 @@ struct ospf_lsa
/* Refreshement List or Queue */
int refresh_list;
+
+ /* For Type-9 Opaque-LSAs */
+ struct ospf_interface *oi;
};
/* OSPF LSA Link Type. */
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbo
{
case OSPF_OPAQUE_LINK_LSA:
/* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */
- if (lsa->oi != nbr->oi)
+ if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi)
return 0;
break;
case OSPF_OPAQUE_AREA_LSA:
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -251,7 +251,7 @@ struct ospf_opaque_functab
void (* config_write_debug )(struct vty *vty);
void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa);
int (* lsa_originator)(void *arg);
- void (* lsa_refresher )(struct ospf_lsa *lsa);
+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa);
int (* new_lsa_hook)(struct ospf_lsa *lsa);
int (* del_lsa_hook)(struct ospf_lsa *lsa);
};
@@ -354,7 +354,7 @@ ospf_register_opaque_functab (
void (* config_write_debug )(struct vty *vty),
void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa),
int (* lsa_originator)(void *arg),
- void (* lsa_refresher )(struct ospf_lsa *lsa),
+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa),
int (* new_lsa_hook)(struct ospf_lsa *lsa),
int (* del_lsa_hook)(struct ospf_lsa *lsa))
{
@@ -1608,12 +1608,13 @@ out:
return new;
}
-void
+struct ospf_lsa *
ospf_opaque_lsa_refresh (struct ospf_lsa *lsa)
{
struct ospf *ospf;
struct ospf_opaque_functab *functab;
-
+ struct ospf_lsa *new = NULL;
+
ospf = ospf_lookup ();
if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL
@@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa
ospf_lsa_flush (ospf, lsa);
}
else
- (* functab->lsa_refresher)(lsa);
+ new = (* functab->lsa_refresher)(lsa);
- return;
+ return new;
}
/*------------------------------------------------------------------------*
--- a/ospfd/ospf_opaque.h
+++ b/ospfd/ospf_opaque.h
@@ -120,7 +120,7 @@ ospf_register_opaque_functab (
void (* config_write_debug )(struct vty *vty),
void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa),
int (* lsa_originator)(void *arg),
- void (* lsa_refresher )(struct ospf_lsa *lsa),
+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa),
int (* new_lsa_hook)(struct ospf_lsa *lsa),
int (* del_lsa_hook)(struct ospf_lsa *lsa)
);
@@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_sc
int *init_delay);
extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *,
int rt_recalc);
-extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa);
+extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa);
extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent,
u_char lsa_type,

View File

@ -1,161 +0,0 @@
From 4c9641ba4df276080c670e03f65b1d442660a50f Mon Sep 17 00:00:00 2001
From: Michael Lambert <lambert@psc.edu>
Date: Thu, 22 Jul 2010 13:20:55 -0400
Subject: [PATCH] bgpd, lib: adopt afi_t and safi_t in several places
* bgpd/bgp_attr.c, bgpd/bgp_open.h, bgpd/bgp_route.c, lib/prefix.c,
lib/prefix.h: Various integer types were being used where, if we
had strict type checking, afi_t and safi_t would be required.
Signed-off-by: G.Balaji <balajig81@gmail.com>
(cherry picked from commit c8af35ffa2dc79ff7d7ff00b1b61f1f50a100ab6)
---
bgpd/bgp_attr.c | 8 ++++----
bgpd/bgp_open.h | 8 ++++----
bgpd/bgp_route.c | 16 ++++++++--------
lib/prefix.c | 4 ++--
lib/prefix.h | 4 ++--
5 files changed, 20 insertions(+), 20 deletions(-)
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -1301,8 +1301,8 @@ int
bgp_mp_reach_parse (struct peer *peer, bgp_size_t length, struct attr *attr,
struct bgp_nlri *mp_update)
{
- u_int16_t afi;
- u_char safi;
+ afi_t afi;
+ safi_t safi;
bgp_size_t nlri_len;
size_t start;
int ret;
@@ -1436,8 +1436,8 @@ bgp_mp_unreach_parse (struct peer *peer,
struct bgp_nlri *mp_withdraw)
{
struct stream *s;
- u_int16_t afi;
- u_char safi;
+ afi_t afi;
+ safi_t safi;
u_int16_t withdraw_len;
int ret;
--- a/bgpd/bgp_open.h
+++ b/bgpd/bgp_open.h
@@ -31,9 +31,9 @@ struct capability_header
/* Generic MP capability data */
struct capability_mp_data
{
- u_int16_t afi;
+ afi_t afi;
u_char reserved;
- u_char safi;
+ safi_t safi;
};
#pragma pack(1)
@@ -55,8 +55,8 @@ struct capability_as4
struct graceful_restart_af
{
- u_int16_t afi;
- u_char safi;
+ afi_t afi;
+ safi_t safi;
u_char flag;
};
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3518,8 +3518,8 @@ bgp_static_update (struct bgp *bgp, stru
}
static void
-bgp_static_update_vpnv4 (struct bgp *bgp, struct prefix *p, u_int16_t afi,
- u_char safi, struct prefix_rd *prd, u_char *tag)
+bgp_static_update_vpnv4 (struct bgp *bgp, struct prefix *p, afi_t afi,
+ safi_t safi, struct prefix_rd *prd, u_char *tag)
{
struct bgp_node *rn;
struct bgp_info *new;
@@ -3599,8 +3599,8 @@ bgp_check_local_routes_rsclient (struct
}
static void
-bgp_static_withdraw_vpnv4 (struct bgp *bgp, struct prefix *p, u_int16_t afi,
- u_char safi, struct prefix_rd *prd, u_char *tag)
+bgp_static_withdraw_vpnv4 (struct bgp *bgp, struct prefix *p, afi_t afi,
+ safi_t safi, struct prefix_rd *prd, u_char *tag)
{
struct bgp_node *rn;
struct bgp_info *ri;
@@ -3653,7 +3653,7 @@ bgp_pathlimit_update_parents (struct bgp
route should be installed as valid. */
static int
bgp_static_set (struct vty *vty, struct bgp *bgp, const char *ip_str,
- u_int16_t afi, u_char safi, const char *rmap, int backdoor,
+ afi_t afi, safi_t safi, const char *rmap, int backdoor,
u_char ttl)
{
int ret;
@@ -3798,7 +3798,7 @@ bgp_static_set (struct vty *vty, struct
/* Configure static BGP network. */
static int
bgp_static_unset (struct vty *vty, struct bgp *bgp, const char *ip_str,
- u_int16_t afi, u_char safi)
+ afi_t afi, safi_t safi)
{
int ret;
struct prefix p;
@@ -7622,7 +7622,7 @@ DEFUN (show_ipv6_mbgp_community_all,
static int
bgp_show_community (struct vty *vty, int argc, const char **argv, int exact,
- u_int16_t afi, u_char safi)
+ afi_t afi, safi_t safi)
{
struct community *com;
struct buffer *b;
@@ -8622,7 +8622,7 @@ ALIAS (show_ipv6_mbgp_community_exact,
static int
bgp_show_community_list (struct vty *vty, const char *com, int exact,
- u_int16_t afi, u_char safi)
+ afi_t afi, safi_t safi)
{
struct community_list *list;
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -41,7 +41,7 @@ static const u_char maskbit[] = {0x00, 0
/* Address Famiy Identifier to Address Family converter. */
int
-afi2family (int afi)
+afi2family (afi_t afi)
{
if (afi == AFI_IP)
return AF_INET;
@@ -52,7 +52,7 @@ afi2family (int afi)
return 0;
}
-int
+afi_t
family2afi (int family)
{
if (family == AF_INET)
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -144,8 +144,8 @@ prefix6_bit (const struct in6_addr *pref
}
/* Prototypes. */
-extern int afi2family (int);
-extern int family2afi (int);
+extern int afi2family (afi_t);
+extern afi_t family2afi (int);
extern struct prefix *prefix_new (void);
extern void prefix_free (struct prefix *);

View File

@ -1,31 +0,0 @@
From: Barry Friedman <barryf@google.com>
Date: Thu, 3 Feb 2011 22:02:53 +0000 (-0800)
Subject: bgpd: Remove extra lock on interior table node
X-Git-Url: http://git.ozo.com/?p=quagga-next.git;a=commitdiff_plain;h=765ec33b44a7d8cf9290acd19dc19953df4ddb0d
bgpd: Remove extra lock on interior table node
If the radix tree creates an extra interior node in bgp_node_get(),
it locks the interior node even though this node is not returned to
the caller, so it may never be unlocked. The lock prevents this node
from being deleted.
* bgpd/bgp_table.c
* bgp_node_get(): Remove lock on interior node which prevents
proper node deletion
Signed-off-by: Barry Friedman <barryf@google.com>
---
diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c
index 91cab60..a249c23 100644
--- a/bgpd/bgp_table.c
+++ b/bgpd/bgp_table.c
@@ -350,7 +350,6 @@ bgp_node_get (struct bgp_table *const table, struct prefix *p)
if (new->p.prefixlen != p->prefixlen)
{
match = new;
- bgp_lock_node (match);
new = bgp_node_set (table, p);
set_link (match, new);
table->count++;

View File

@ -1,11 +0,0 @@
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -451,7 +451,7 @@ zsend_route_multipath (int cmd, struct z
}
/* Metric */
- if (cmd == ZEBRA_IPV4_ROUTE_ADD || ZEBRA_IPV6_ROUTE_ADD)
+ if (cmd == ZEBRA_IPV4_ROUTE_ADD || cmd == ZEBRA_IPV6_ROUTE_ADD)
{
SET_FLAG (zapi_flags, ZAPI_MESSAGE_DISTANCE);
stream_putc (s, rib->distance);

View File

@ -1,24 +0,0 @@
From 213b6cd9fb24381563d6d44c7ddc4700abfae676 Mon Sep 17 00:00:00 2001
From: Vladimir L Ivanov <wawa@yandex-team.ru>
Date: Thu, 21 Oct 2010 14:59:54 +0400
Subject: [PATCH] bgpd: fix printed value of last-update timestamp
* bgp_route.c: (route_vty_out_detail) calculate time value
in a way, which works regardless of monotonic clock
being used or not
---
bgpd/bgp_route.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6145,7 +6145,8 @@ route_vty_out_detail (struct vty *vty, s
bgp_damp_info_vty (vty, binfo);
/* Line 7 display Uptime */
- vty_out (vty, " Last update: %s", ctime (&binfo->uptime));
+ time_t tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
+ vty_out (vty, " Last update: %s", ctime(&tbuf));
}
vty_out (vty, "%s", VTY_NEWLINE);
}

View File

@ -1,11 +0,0 @@
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -250,7 +250,7 @@ vty_hello (struct vty *vty)
vty_out (vty, "MOTD file not found%s", VTY_NEWLINE);
}
else if (host.motd)
- vty_out (vty, host.motd);
+ vty_out (vty, "%s", host.motd);
}
/* Put out prompt and wait input from user. */

View File

@ -1,16 +0,0 @@
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -177,10 +177,11 @@ bgp_update_packet (struct peer *peer, af
if (rn->prn)
prd = (struct prefix_rd *) &rn->prn->p;
- if (binfo && binfo->extra)
+ if (binfo)
{
- tag = binfo->extra->tag;
from = binfo->peer;
+ if (binfo->extra)
+ tag = binfo->extra->tag;
}
bgp_packet_set_marker (s, BGP_MSG_UPDATE);

View File

@ -407,7 +407,7 @@
"Route map reference\n"
--- a/lib/log.c
+++ b/lib/log.c
@@ -835,6 +835,8 @@ static const struct zebra_desc_table rou
@@ -838,6 +838,8 @@ static const struct zebra_desc_table rou
DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ),
DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ),
DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ),

View File

@ -2446,8 +2446,6 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
+
+ return 0;
+}
+
+/*! --------------- Edge Detection ------------------ !*/
--- /dev/null
+++ b/bgpd/bgp_pgbgp.h
@@ -0,0 +1,286 @@
@ -2767,7 +2765,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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);
}
@ -2778,7 +2776,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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)
{
@ -2790,7 +2788,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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);
@ -2802,7 +2800,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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)
{
@ -2823,7 +2821,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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
}
#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"
@ -2831,7 +2829,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
#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,
@ -2841,7 +2839,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
};
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;
}
@ -2859,7 +2857,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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);
}
@ -2867,7 +2865,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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,
@@ -11063,6 +11108,64 @@ DEFUN (bgp_damp_set,
half, reuse, suppress, max);
}
@ -2932,7 +2930,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
ALIAS (bgp_damp_set,
bgp_damp_set2_cmd,
"bgp dampening <1-45>",
@@ -11283,6 +11386,19 @@ DEFUN (show_ip_bgp_dampened_paths,
@@ -11112,6 +11215,19 @@ DEFUN (show_ip_bgp_dampened_paths,
NULL);
}
@ -2952,7 +2950,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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)
@@ -11629,6 +11745,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);
@ -2960,7 +2958,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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)
@@ -11736,6 +11853,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);
@ -2968,17 +2966,17 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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);
@@ -12093,6 +12211,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 @@
@ -2997,7 +2995,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 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 \
@ -3008,9 +3006,9 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
* 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;
+
@ -3019,7 +3017,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
};
--- 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)
@ -3029,7 +3027,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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,
}
}
@ -3067,7 +3065,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
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 *);
@ -3079,7 +3077,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
--- a/lib/memtypes.c
+++ b/lib/memtypes.c
@@ -147,6 +147,15 @@ struct memory_list memory_list_bgp[] =
@@ -149,6 +149,15 @@ struct memory_list memory_list_bgp[] =
{ MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" },
{ MTYPE_BGP_DAMP_INFO, "Dampening info" },
{ MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" },

View File

@ -24,7 +24,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
--- a/bgpd/bgp_pgbgp.c
+++ b/bgpd/bgp_pgbgp.c
@@ -225,7 +225,7 @@ static void
@@ -227,7 +227,7 @@ static void
edge_neighbor_iterator (struct hash_backet *backet, struct nsearch *pns)
{
struct bgp_pgbgp_edge *hedge = backet->data;
@ -33,7 +33,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
&& hedge->e.a != hedge->e.b)
{
struct vty *vty = pns->pvty;
@@ -252,13 +252,39 @@ bgp_pgbgp_stats_neighbors (struct vty *vty, afi_t afi, safi_t safi, as_t asn)
@@ -254,13 +254,39 @@ bgp_pgbgp_stats_neighbors (struct vty *v
return CMD_SUCCESS;
}
@ -73,7 +73,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
bgp = bgp_get_default ();
if (bgp == NULL)
return CMD_WARNING;
@@ -267,28 +293,22 @@ bgp_pgbgp_stats_origins (struct vty *vty, afi_t afi, safi_t safi,
@@ -269,28 +295,22 @@ bgp_pgbgp_stats_origins (struct vty *vty
table = bgp->rib[afi][safi];
if (table == NULL)
return CMD_WARNING;
@ -114,7 +114,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
return CMD_SUCCESS;
}
@@ -375,7 +395,7 @@ bgp_pgbgp_stats (struct vty *vty, afi_t afi, safi_t safi)
@@ -377,7 +397,7 @@ bgp_pgbgp_stats (struct vty *vty, afi_t
DEFUN (show_ip_bgp_pgbgp,
show_ip_bgp_pgbgp_cmd,
"show ip bgp pgbgp",
@ -123,7 +123,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
{
return bgp_pgbgp_stats (vty, AFI_IP, SAFI_UNICAST);
}
@@ -383,29 +403,46 @@ DEFUN (show_ip_bgp_pgbgp,
@@ -385,29 +405,46 @@ DEFUN (show_ip_bgp_pgbgp,
DEFUN (show_ip_bgp_pgbgp_neighbors,
show_ip_bgp_pgbgp_neighbors_cmd,
"show ip bgp pgbgp neighbors WORD",
@ -180,7 +180,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
/*! --------------- VTY (others exist in bgp_route.c) ------------------ !*/
@@ -747,12 +784,19 @@ bgp_pgbgp_enable (struct bgp *bgp, afi_t afi, safi_t safi,
@@ -749,12 +786,19 @@ bgp_pgbgp_enable (struct bgp *bgp, afi_t
pgbgp->lastgc = time (NULL);
pgbgp->lastStore = time (NULL);
pgbgp->startTime = time (NULL);
@ -204,7 +204,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
return 0;
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5670,20 +5670,6 @@ enum bgp_display_type
@@ -5496,20 +5496,6 @@ enum bgp_display_type
static void
route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo)
{
@ -225,7 +225,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
/* Route status display. */
if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED))
vty_out (vty, "R");
@@ -5699,6 +5685,17 @@ route_vty_short_status_out (struct vty *
@@ -5525,6 +5511,17 @@ route_vty_short_status_out (struct vty *
/* Selected */
if (CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
vty_out (vty, "h");
@ -243,7 +243,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
else if (CHECK_FLAG (binfo->flags, BGP_INFO_DAMPED))
vty_out (vty, "d");
else if (CHECK_FLAG (binfo->flags, BGP_INFO_SELECTED))
@@ -6180,15 +6177,31 @@ route_vty_out_detail (struct vty *vty, s
@@ -5998,7 +5995,22 @@ route_vty_out_detail (struct vty *vty, s
if (binfo->extra && binfo->extra->damp_info)
bgp_damp_info_vty (vty, binfo);
@ -264,9 +264,10 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
+ }
+
+ /* Line 9 display Uptime */
time_t tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
#ifdef HAVE_CLOCK_MONOTONIC
tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
vty_out (vty, " Last update: %s", ctime(&tbuf));
}
@@ -6009,8 +6021,9 @@ route_vty_out_detail (struct vty *vty, s
vty_out (vty, "%s", VTY_NEWLINE);
}
@ -278,7 +279,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
#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"
@@ -6397,8 +6410,7 @@ bgp_show_table (struct vty *vty, struct
@@ -6219,8 +6232,7 @@ bgp_show_table (struct vty *vty, struct
if (header)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (*router_id), VTY_NEWLINE);
@ -288,7 +289,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
@@ -9663,7 +9675,7 @@ show_adj_route (struct vty *vty, struct
@@ -9492,7 +9504,7 @@ show_adj_route (struct vty *vty, struct
PEER_STATUS_DEFAULT_ORIGINATE))
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
@ -297,7 +298,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
vty_out (vty, "Originating default network 0.0.0.0%s%s",
@@ -9680,7 +9692,7 @@ show_adj_route (struct vty *vty, struct
@@ -9509,7 +9521,7 @@ show_adj_route (struct vty *vty, struct
if (header1)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
@ -306,7 +307,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
header1 = 0;
}
@@ -9704,7 +9716,7 @@ show_adj_route (struct vty *vty, struct
@@ -9533,7 +9545,7 @@ show_adj_route (struct vty *vty, struct
if (header1)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);