summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-14 21:19:33 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-05-14 21:19:33 -0400
commit56afaa8bcbe59b62faff57546359df89c7b6fb4a (patch)
treeb83ebd62b6f5f2f617b26b07a830dc41bb51da00
parent8d7bba28749d767d12190b8a84b7b78b6397c971 (diff)
parent7b87a0d5c60fa627ed0cd833a71138725c621513 (diff)
Merge remote-tracking branch 'origin/stable/3.0'
-rw-r--r--bgpd/bgp_encap.c137
-rw-r--r--bgpd/bgp_mplsvpn.c1
-rw-r--r--bgpd/bgp_route.c25
-rw-r--r--doc/Building_FRR_on_Debian8.md39
-rw-r--r--lib/grammar_sandbox.c17
-rw-r--r--vtysh/vtysh.c20
6 files changed, 70 insertions, 169 deletions
diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c
index 603979942d..23be34c63b 100644
--- a/bgpd/bgp_encap.c
+++ b/bgpd/bgp_encap.c
@@ -577,73 +577,6 @@ DEFUN (show_bgp_ipv6_encap_rd_tags,
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1);
}
-DEFUN (show_bgp_ipv4_encap_neighbor_routes,
- show_bgp_ipv4_encap_neighbor_routes_cmd,
- "show [ip] bgp ipv4 encap neighbors A.B.C.D routes",
- SHOW_STR
- IP_STR
- BGP_STR
- "Address Family\n"
- "Display ENCAP NLRI specific information\n"
- "Detailed information on TCP and BGP neighbor connections\n"
- "Neighbor to display information about\n"
- "Display routes learned from neighbor\n")
-{
- int idx_peer = 0;
- union sockunion *su;
- struct peer *peer;
-
- argv_find(argv, argc, "A.B.C.D", &idx_peer);
- su = sockunion_str2su (argv[idx_peer]->arg);
-
- if (!su)
- {
- vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- peer = peer_lookup (NULL, su);
- if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP])
- {
- vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_neighbor, su, 0);
-}
-
-DEFUN (show_bgp_ipv6_encap_neighbor_routes,
- show_bgp_ipv6_encap_neighbor_routes_cmd,
- "show [ip] bgp ipv6 encap neighbors A.B.C.D routes",
- SHOW_STR
- IP_STR
- BGP_STR
- "Address Family\n"
- "Display ENCAP NLRI specific information\n"
- "Detailed information on TCP and BGP neighbor connections\n"
- "Neighbor to display information about\n"
- "Display routes learned from neighbor\n")
-{
- int idx_peer = 5;
- union sockunion su;
- struct peer *peer;
-
- if (str2sockunion(argv[idx_peer]->arg, &su))
- {
- vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- peer = peer_lookup (NULL, &su);
- if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP])
- {
- vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_neighbor, &su, 0);
-}
-
DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
show_bgp_ipv4_encap_rd_neighbor_routes_cmd,
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> routes",
@@ -734,72 +667,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes,
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0);
}
-DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes,
- show_bgp_ipv4_encap_neighbor_advertised_routes_cmd,
- "show [ip] bgp ipv4 encap neighbors A.B.C.D advertised-routes",
- SHOW_STR
- IP_STR
- BGP_STR
- "Address Family\n"
- "Display ENCAP NLRI specific information\n"
- "Detailed information on TCP and BGP neighbor connections\n"
- "Neighbor to display information about\n"
- "Display the routes advertised to a BGP neighbor\n")
-{
- int idx_peer = 5;
- int ret;
- struct peer *peer;
- union sockunion su;
-
- ret = str2sockunion (argv[idx_peer]->arg, &su);
- if (ret < 0)
- {
- vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
- return CMD_WARNING;
- }
- peer = peer_lookup (NULL, &su);
- if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP])
- {
- vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- return show_adj_route_encap (vty, peer, NULL);
-}
-
-DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes,
- show_bgp_ipv6_encap_neighbor_advertised_routes_cmd,
- "show [ip] bgp ipv6 encap neighbors A.B.C.D advertised-routes",
- SHOW_STR
- IP_STR
- BGP_STR
- "Address Family\n"
- "Display ENCAP NLRI specific information\n"
- "Detailed information on TCP and BGP neighbor connections\n"
- "Neighbor to display information about\n"
- "Display the routes advertised to a BGP neighbor\n")
-{
- int idx_peer = 5;
- int ret;
- struct peer *peer;
- union sockunion su;
-
- ret = str2sockunion (argv[idx_peer]->arg, &su);
- if (ret < 0)
- {
- vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
- return CMD_WARNING;
- }
- peer = peer_lookup (NULL, &su);
- if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP])
- {
- vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- return show_adj_route_encap (vty, peer, NULL);
-}
-
DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes,
show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd,
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> advertised-routes",
@@ -899,16 +766,12 @@ bgp_encap_init (void)
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd);
- install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_routes_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd);
- install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_advertised_routes_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd);
- install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_routes_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd);
- install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_advertised_routes_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd);
}
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 421b62fba0..97b40df28a 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -1196,7 +1196,6 @@ bgp_mplsvpn_init (void)
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd);
#ifdef KEEP_OLD_VPN_COMMANDS
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_tags_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_tags_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_neighbor_routes_cmd);
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 24a68778dc..834b9e073e 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -4401,7 +4401,7 @@ bgp_static_add (struct bgp *bgp)
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
{
- bgp_static = rn->info;
+ bgp_static = rm->info;
bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi);
}
}
@@ -4435,7 +4435,7 @@ bgp_static_delete (struct bgp *bgp)
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
{
- bgp_static = rn->info;
+ bgp_static = rm->info;
bgp_static_withdraw_safi (bgp, &rm->p,
AFI_IP, safi,
(struct prefix_rd *)&rn->p,
@@ -4462,6 +4462,8 @@ bgp_static_redo_import_check (struct bgp *bgp)
afi_t afi;
safi_t safi;
struct bgp_node *rn;
+ struct bgp_node *rm;
+ struct bgp_table *table;
struct bgp_static *bgp_static;
/* Use this flag to force reprocessing of the route */
@@ -4471,8 +4473,21 @@ bgp_static_redo_import_check (struct bgp *bgp)
for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn))
if (rn->info != NULL)
{
- bgp_static = rn->info;
- bgp_static_update (bgp, &rn->p, bgp_static, afi, safi);
+ if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN))
+ {
+ table = rn->info;
+
+ for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
+ {
+ bgp_static = rm->info;
+ bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi);
+ }
+ }
+ else
+ {
+ bgp_static = rn->info;
+ bgp_static_update (bgp, &rn->p, bgp_static, afi, safi);
+ }
}
bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS);
}
@@ -8654,7 +8669,7 @@ DEFUN (show_ip_bgp,
}
/* prefix-longer */
if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx))
- return bgp_show_prefix_longer (vty, bgp, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer);
+ return bgp_show_prefix_longer (vty, bgp, argv[idx]->arg, afi, safi, bgp_show_type_prefix_longer);
if (safi == SAFI_MPLS_VPN)
return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj);
diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md
index a42ca6d781..1a961f752a 100644
--- a/doc/Building_FRR_on_Debian8.md
+++ b/doc/Building_FRR_on_Debian8.md
@@ -4,8 +4,8 @@ Building FRR on Debian 8 from Git Source
Debian 8 restrictions:
----------------------
-- MPLS is not supported on `Debian 8` with default kernel. MPLS requires
- Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
+- MPLS is not supported on `Debian 8` with default kernel. MPLS requires
+ Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
without MPLS)
Install required packages
@@ -24,7 +24,7 @@ Install newer pytest (>3.0) from pip
Get FRR, compile it and install it (from Git)
---------------------------------------------
-**This assumes you want to build and install FRR from source and not using
+**This assumes you want to build and install FRR from source and not using
any packages**
### Add frr groups and user
@@ -87,7 +87,7 @@ an example.)
### Enable IP & IPv6 forwarding
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
+Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
other settings)
# Uncomment the next line to enable packet forwarding for IPv4
@@ -99,3 +99,34 @@ other settings)
net.ipv6.conf.all.forwarding=1
**Reboot** or use `sysctl -p` to apply the same config to the running system
+
+### Troubleshooting
+
+**Local state directory**
+
+The local state directory must exist and have the correct permissions applied
+for the frrouting daemons to start. In the above ./configure example the
+local state directory is set to /var/run/frr (--localstatedir=/var/run/frr)
+Debian considers /var/run/frr to be temporary and this is removed after a
+reboot.
+
+When using a different local state directory you need to create the new
+directory and change the ownership to the frr user, for example:
+
+ mkdir /var/opt/frr
+ chown frr /var/opt/frr
+
+**Shared library error**
+
+If you try and start any of the frrouting daemons you may see the below error
+due to the frrouting shared library directory not being found:
+
+ ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
+
+The fix is to add the following line to /etc/ld.so.conf which will continue to
+reference the library directory after the system reboots. To load the library
+directory path immediately run the ldconfig command after adding the line to
+the file eg:
+
+ echo include /usr/local/lib >> /etc/ld.so.conf
+ ldconfig
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c
index 97de943216..0da7981fc1 100644
--- a/lib/grammar_sandbox.c
+++ b/lib/grammar_sandbox.c
@@ -588,7 +588,7 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start,
return;
snprintf(tokennum, sizeof(tokennum), "%d?", tok->type);
- fprintf(ofd, " n%016llx [ shape=box, label=<", (unsigned long long)start);
+ fprintf(ofd, " n%p [ shape=box, label=<", start);
fprintf(ofd, "<b>%s</b>", LOOKUP_DEF(tokennames, tok->type, tokennum));
if (tok->attr == CMD_ATTR_DEPRECATED)
@@ -621,20 +621,13 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start,
struct graph_node *adj = vector_slot (start->to, i);
// if this node is a vararg, just print *
if (adj == start) {
- fprintf(ofd, " n%016llx -> n%016llx;\n",
- (unsigned long long)start,
- (unsigned long long)start);
+ fprintf(ofd, " n%p -> n%p;\n", start, start);
} else if (((struct cmd_token *)adj->data)->type == END_TKN) {
//struct cmd_token *et = adj->data;
- fprintf(ofd, " n%016llx -> end%016llx;\n",
- (unsigned long long)start,
- (unsigned long long)adj);
- fprintf(ofd, " end%016llx [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n",
- (unsigned long long)adj);
+ fprintf(ofd, " n%p -> end%p;\n", start, adj);
+ fprintf(ofd, " end%p [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n", adj);
} else {
- fprintf(ofd, " n%016llx -> n%016llx;\n",
- (unsigned long long)start,
- (unsigned long long)adj);
+ fprintf(ofd, " n%p -> n%p;\n", start, adj);
size_t k;
for (k = 0; k < stackpos; k++)
if (stack[k] == adj)
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 3967cfc934..c28d57cff2 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1359,22 +1359,22 @@ DEFUNSH (VTYSH_RIPD,
}
DEFUNSH (VTYSH_RIPD,
- router_rip,
- router_rip_cmd,
- "router rip",
- ROUTER_STR
- "RIP")
+ router_rip,
+ router_rip_cmd,
+ "router rip",
+ ROUTER_STR
+ "RIP\n")
{
vty->node = RIP_NODE;
return CMD_SUCCESS;
}
DEFUNSH (VTYSH_RIPNGD,
- router_ripng,
- router_ripng_cmd,
- "router ripng",
- ROUTER_STR
- "RIPng")
+ router_ripng,
+ router_ripng_cmd,
+ "router ripng",
+ ROUTER_STR
+ "RIPng\n")
{
vty->node = RIPNG_NODE;
return CMD_SUCCESS;