|
@@ -649,24 +649,23 @@ DEFUN (show_bgp_ipv4_encap_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)
|
|
|
+
|
|
|
+ if (str2sockunion(argv[0], &su))
|
|
|
{
|
|
|
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- peer = peer_lookup (NULL, su);
|
|
|
+ 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);
|
|
|
+ return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_neighbor, &su, 0);
|
|
|
}
|
|
|
|
|
|
DEFUN (show_bgp_ipv6_encap_neighbor_routes,
|
|
@@ -680,24 +679,23 @@ DEFUN (show_bgp_ipv6_encap_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)
|
|
|
+ if (str2sockunion(argv[0], &su))
|
|
|
{
|
|
|
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- peer = peer_lookup (NULL, su);
|
|
|
+ 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);
|
|
|
+ return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_neighbor, &su, 0);
|
|
|
}
|
|
|
|
|
|
DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
|
|
@@ -715,7 +713,7 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
|
|
|
"Display routes learned from neighbor\n")
|
|
|
{
|
|
|
int ret;
|
|
|
- union sockunion *su;
|
|
|
+ union sockunion su;
|
|
|
struct peer *peer;
|
|
|
struct prefix_rd prd;
|
|
|
|
|
@@ -726,21 +724,20 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- su = sockunion_str2su (argv[1]);
|
|
|
- if (su == NULL)
|
|
|
+ if (str2sockunion(argv[1], &su))
|
|
|
{
|
|
|
vty_out (vty, "Malformed address: %s%s", argv[1], VTY_NEWLINE);
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- peer = peer_lookup (NULL, su);
|
|
|
+ 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, &prd, bgp_show_type_neighbor, su, 0);
|
|
|
+ return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_neighbor, &su, 0);
|
|
|
}
|
|
|
|
|
|
DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes,
|
|
@@ -758,7 +755,7 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes,
|
|
|
"Display routes learned from neighbor\n")
|
|
|
{
|
|
|
int ret;
|
|
|
- union sockunion *su;
|
|
|
+ union sockunion su;
|
|
|
struct peer *peer;
|
|
|
struct prefix_rd prd;
|
|
|
|
|
@@ -769,21 +766,20 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes,
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- su = sockunion_str2su (argv[1]);
|
|
|
- if (su == NULL)
|
|
|
+ if (str2sockunion(argv[1], &su))
|
|
|
{
|
|
|
vty_out (vty, "Malformed address: %s%s", argv[1], VTY_NEWLINE);
|
|
|
return CMD_WARNING;
|
|
|
}
|
|
|
|
|
|
- peer = peer_lookup (NULL, su);
|
|
|
+ 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, &prd, bgp_show_type_neighbor, su, 0);
|
|
|
+ return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0);
|
|
|
}
|
|
|
|
|
|
DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes,
|