mirror of
https://git.savannah.gnu.org/git/inetutils.git
synced 2026-01-12 00:19:39 +08:00
traceroute: Gateway selection.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
||||
2013-07-04 Mats Erik Andersson <gnu@gisladisker.se>
|
||||
|
||||
traceroute: Gateway selection.
|
||||
Make `-g' additive in repeated use to better
|
||||
conform with other implementations.
|
||||
|
||||
* src/traceroute.c (parse_opt) [IP_OPTIONS] <'g'>:
|
||||
Append `arg' to `opt_gateways' if the latter has
|
||||
already been assigned a value.
|
||||
|
||||
2013-06-28 Mats Erik Andersson <gnu@gisladisker.se>
|
||||
|
||||
traceroute: Portability of PID range.
|
||||
|
||||
@@ -1060,6 +1060,7 @@ using spaces, commata, or semicola as separators.
|
||||
These hosts must be traversed in the given order
|
||||
before the intended host receives any datagram.
|
||||
At most eight host names or addresses may be specified.
|
||||
Multiple uses of @option{-g} produce a concatenated list.
|
||||
|
||||
@item -I
|
||||
@itemx --icmp
|
||||
|
||||
@@ -179,7 +179,22 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||
|
||||
#ifdef IP_OPTIONS
|
||||
case 'g':
|
||||
opt_gateways = xstrdup (arg);
|
||||
if (opt_gateways)
|
||||
{
|
||||
size_t len = 0;
|
||||
|
||||
len = strlen (opt_gateways);
|
||||
opt_gateways = xrealloc (opt_gateways, len + strlen (arg) + 3);
|
||||
|
||||
/* Append new gateways to old list,
|
||||
* separating the two parts by a comma.
|
||||
*/
|
||||
opt_gateways[len] = ',';
|
||||
opt_gateways[len + 1] = '\0';
|
||||
strcat (opt_gateways, arg);
|
||||
}
|
||||
else
|
||||
opt_gateways = xstrdup (arg);
|
||||
break;
|
||||
#endif /* IP_OPTIONS */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user