summaryrefslogtreecommitdiff
path: root/bgpd/bgp_mplsvpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_mplsvpn.c')
-rw-r--r--bgpd/bgp_mplsvpn.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index c1f1fbb3..b0cf2a98 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -581,24 +581,25 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes,
"Neighbor to display information about\n"
"Display routes learned from neighbor\n")
{
- union sockunion *su;
+ union sockunion su;
struct peer *peer;
-
- su = sockunion_str2su (argv[0]);
- if (su == NULL)
+ int ret;
+
+ ret = str2sockunion (argv[0], &su);
+ if (ret < 0)
{
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
- return CMD_WARNING;
+ return CMD_WARNING;
}
- peer = peer_lookup (NULL, su);
+ peer = peer_lookup (NULL, &su);
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
{
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
return CMD_WARNING;
}
- return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_neighbor, su, 0);
+ return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_neighbor, &su, 0);
}
DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
@@ -615,7 +616,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
"Display routes learned from neighbor\n")
{
int ret;
- union sockunion *su;
+ union sockunion su;
struct peer *peer;
struct prefix_rd prd;
@@ -626,21 +627,21 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
return CMD_WARNING;
}
- su = sockunion_str2su (argv[1]);
- if (su == NULL)
+ ret = str2sockunion (argv[1], &su);
+ if (ret < 0)
{
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
- return CMD_WARNING;
+ return CMD_WARNING;
}
- peer = peer_lookup (NULL, su);
+ peer = peer_lookup (NULL, &su);
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
{
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
return CMD_WARNING;
}
- return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_neighbor, su, 0);
+ return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_neighbor, &su, 0);
}
DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes,