mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
traceroute6: remove -l flag
The -l flag was used to tell traceroute6(8) to show both hostname and address for each hop. However, traceroute(8) already does this by default, and there's no reason for traceroute6 to behave differently. Make this the default behaviour, and accept -l for backward compatibility as a no-op flag. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1023
This commit is contained in:
parent
e0c4386e7e
commit
0a49be722f
|
@ -27,7 +27,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd October 25, 2023
|
||||
.Dd February 2, 2024
|
||||
.Dt TRACEROUTE6 8
|
||||
.Os
|
||||
.\"
|
||||
|
@ -120,14 +120,7 @@ tries to use routing headers.
|
|||
.It Fl I
|
||||
Use ICMP6 ECHO instead of UDP datagrams.
|
||||
.It Fl l
|
||||
Print both host hostnames and numeric addresses.
|
||||
Normally
|
||||
.Nm
|
||||
prints only hostnames if
|
||||
.Fl n
|
||||
is not specified, and only numeric addresses if
|
||||
.Fl n
|
||||
is specified.
|
||||
Ignored for backward compatibility.
|
||||
.It Fl m Ar hoplimit
|
||||
Specify maximum hoplimit, up to 255.
|
||||
The default is the value of the
|
||||
|
|
|
@ -339,7 +339,6 @@ static int verbose;
|
|||
static int waittime = 5; /* time to wait for response (in seconds) */
|
||||
static int nflag; /* print addresses numerically */
|
||||
static int useproto = IPPROTO_UDP; /* protocol to use to send packet */
|
||||
static int lflag; /* print both numerical address & hostname */
|
||||
static int as_path; /* print as numbers for each hop */
|
||||
static int ecnflag; /* ECN bleaching detection flag */
|
||||
static char *as_server = NULL;
|
||||
|
@ -462,7 +461,6 @@ main(int argc, char *argv[])
|
|||
useproto = IPPROTO_ICMPV6;
|
||||
break;
|
||||
case 'l':
|
||||
lflag++;
|
||||
break;
|
||||
case 'm':
|
||||
ep = NULL;
|
||||
|
@ -1584,10 +1582,8 @@ print(struct msghdr *mhdr, int cc)
|
|||
printf(" [AS%u]", as_lookup(asn, hbuf, AF_INET6));
|
||||
if (nflag)
|
||||
printf(" %s", hbuf);
|
||||
else if (lflag)
|
||||
printf(" %s (%s)", inetname((struct sockaddr *)from), hbuf);
|
||||
else
|
||||
printf(" %s", inetname((struct sockaddr *)from));
|
||||
printf(" %s (%s)", inetname((struct sockaddr *)from), hbuf);
|
||||
|
||||
if (verbose) {
|
||||
#ifdef OLDRAWSOCKET
|
||||
|
|
Loading…
Reference in a new issue