summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c54
-rwxr-xr-xconfigure.ac2
-rw-r--r--ospfclient/ospfclient.c1
-rw-r--r--ospfd/ospf_lsdb.c1
-rw-r--r--vtysh/vtysh_main.c8
-rw-r--r--zebra/zebra_rib.c6
6 files changed, 61 insertions, 11 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4f3f85b3..5e175c8e 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -9635,12 +9635,14 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, int
return CMD_SUCCESS;
}
-DEFUN (show_ip_bgp_neighbor_advertised_route,
- show_ip_bgp_neighbor_advertised_route_cmd,
- "show ip bgp neighbors (A.B.C.D|X:X::X:X) advertised-routes",
+DEFUN (show_ip_bgp_view_neighbor_advertised_route,
+ show_ip_bgp_view_neighbor_advertised_route_cmd,
+ "show ip bgp view WORD neighbors (A.B.C.D|X:X::X:X) advertised-routes",
SHOW_STR
IP_STR
BGP_STR
+ "BGP view\n"
+ "View name\n"
"Detailed information on TCP and BGP neighbor connections\n"
"Neighbor to display information about\n"
"Neighbor to display information about\n"
@@ -9648,13 +9650,28 @@ DEFUN (show_ip_bgp_neighbor_advertised_route,
{
struct peer *peer;
- peer = peer_lookup_in_view (vty, NULL, argv[0]);
+ if (argc == 2)
+ peer = peer_lookup_in_view (vty, argv[0], argv[1]);
+ else
+ peer = peer_lookup_in_view (vty, NULL, argv[0]);
+
if (! peer)
return CMD_WARNING;
return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 0);
}
+ALIAS (show_ip_bgp_view_neighbor_advertised_route,
+ show_ip_bgp_neighbor_advertised_route_cmd,
+ "show ip bgp neighbors (A.B.C.D|X:X::X:X) advertised-routes",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Display the routes advertised to a BGP neighbor\n")
+
DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route,
show_ip_bgp_ipv4_neighbor_advertised_route_cmd,
"show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) advertised-routes",
@@ -9813,12 +9830,14 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route,
}
#endif /* HAVE_IPV6 */
-DEFUN (show_ip_bgp_neighbor_received_routes,
- show_ip_bgp_neighbor_received_routes_cmd,
- "show ip bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
+DEFUN (show_ip_bgp_view_neighbor_received_routes,
+ show_ip_bgp_view_neighbor_received_routes_cmd,
+ "show ip bgp view WORD neighbors (A.B.C.D|X:X::X:X) received-routes",
SHOW_STR
IP_STR
BGP_STR
+ "BGP view\n"
+ "View name\n"
"Detailed information on TCP and BGP neighbor connections\n"
"Neighbor to display information about\n"
"Neighbor to display information about\n"
@@ -9826,13 +9845,28 @@ DEFUN (show_ip_bgp_neighbor_received_routes,
{
struct peer *peer;
- peer = peer_lookup_in_view (vty, NULL, argv[0]);
+ if (argc == 2)
+ peer = peer_lookup_in_view (vty, argv[0], argv[1]);
+ else
+ peer = peer_lookup_in_view (vty, NULL, argv[0]);
+
if (! peer)
return CMD_WARNING;
return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 1);
}
+ALIAS (show_ip_bgp_view_neighbor_received_routes,
+ show_ip_bgp_neighbor_received_routes_cmd,
+ "show ip bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Display the received routes from neighbor\n")
+
DEFUN (show_ip_bgp_ipv4_neighbor_received_routes,
show_ip_bgp_ipv4_neighbor_received_routes_cmd,
"show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) received-routes",
@@ -11758,6 +11792,8 @@ bgp_route_init (void)
install_element (VIEW_NODE, &show_ip_bgp_rsclient_cmd);
install_element (VIEW_NODE, &show_ip_bgp_rsclient_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_rsclient_prefix_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_view_rsclient_cmd);
install_element (VIEW_NODE, &show_ip_bgp_view_rsclient_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_view_rsclient_prefix_cmd);
@@ -11863,6 +11899,8 @@ bgp_route_init (void)
install_element (ENABLE_NODE, &show_ip_bgp_rsclient_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_rsclient_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_rsclient_prefix_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_view_rsclient_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_view_rsclient_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_view_rsclient_prefix_cmd);
diff --git a/configure.ac b/configure.ac
index d0d81834..cd883d2a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,8 @@ BSD awk complains: awk: gensub doesn't support backreferences (subst "\1") ])
fi
AC_ARG_VAR([GAWK],[GNU AWK])
+AC_SYS_LARGEFILE
+
dnl default is to match previous behavior
exampledir=${sysconfdir}
AC_ARG_ENABLE([exampledir],
diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c
index ef1d22b4..3608ebac 100644
--- a/ospfclient/ospfclient.c
+++ b/ospfclient/ospfclient.c
@@ -12,6 +12,7 @@
#include <zebra.h>
#include "prefix.h" /* needed by ospf_asbr.h */
#include "privs.h"
+#include "log.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_asbr.h"
diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c
index a992cf4f..2e1bdedf 100644
--- a/ospfd/ospf_lsdb.c
+++ b/ospfd/ospf_lsdb.c
@@ -25,6 +25,7 @@
#include "prefix.h"
#include "table.h"
#include "memory.h"
+#include "log.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_asbr.h"
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 23ff64f7..4a315a5c 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -42,6 +42,7 @@ char *progname;
/* Configuration file name and directory. */
char config_default[] = SYSCONFDIR VTYSH_DEFAULT_CONFIG;
+char history_file[MAXPATHLEN];
/* Flag for indicate executing child command. */
int execute_flag = 0;
@@ -188,8 +189,10 @@ vtysh_rl_gets ()
{
using_history();
last = previous_history();
- if (!last || strcmp (last->line, line_read) != 0)
+ if (!last || strcmp (last->line, line_read) != 0) {
add_history (line_read);
+ append_history(1,history_file);
+ }
}
return (line_read);
@@ -399,10 +402,13 @@ main (int argc, char **argv, char **env)
sigsetjmp (jmpbuf, 1);
jmpflag = 1;
+ snprintf(history_file, sizeof(history_file), "%s/.history_quagga", getenv("HOME"));
+ read_history(history_file);
/* Main command loop. */
while (vtysh_rl_gets ())
vtysh_execute (line_read);
+ history_truncate_file(history_file,1000);
printf ("\n");
/* Rest in peace. */
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index e2108fcb..e11afaf1 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -905,7 +905,7 @@ static int
nexthop_active_update (struct route_node *rn, struct rib *rib, int set)
{
struct nexthop *nexthop;
- int prev_active, new_active;
+ int prev_active, prev_index, new_active;
rib->nexthop_active_num = 0;
UNSET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);
@@ -913,9 +913,11 @@ nexthop_active_update (struct route_node *rn, struct rib *rib, int set)
for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next)
{
prev_active = CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
+ prev_index = nexthop->ifindex;
if ((new_active = nexthop_active_check (rn, rib, nexthop, set)))
rib->nexthop_active_num++;
- if (prev_active != new_active)
+ if (prev_active != new_active ||
+ prev_index != nexthop->ifindex)
SET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);
}
return rib->nexthop_active_num;