diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2019-07-16 12:57:59 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2019-07-16 12:57:59 +0000 |
commit | 1f69b3fb55ee0c91b14d428fa114a2c812c723a9 (patch) | |
tree | 427b1652b98223518cd1fa72ba43b59a4553c175 /usr.sbin/traceroute6 | |
parent | 64694fdcc0bedcad1bf31e65327106da996a64cb (diff) |
Add support for ICMPv6 messages indicating a parameter problem related
to an unrecognized next header.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=350028
Diffstat (limited to 'usr.sbin/traceroute6')
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.8 | 4 | ||||
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/traceroute6/traceroute6.8 b/usr.sbin/traceroute6/traceroute6.8 index 42465fa706b9..ba52f146d72b 100644 --- a/usr.sbin/traceroute6/traceroute6.8 +++ b/usr.sbin/traceroute6/traceroute6.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2018 +.Dd July 16, 2019 .Dt TRACEROUTE6 8 .Os .\" @@ -172,6 +172,8 @@ Destination Unreachable - Administratively Prohibited. Destination Unreachable - Not a Neighbour. .It !A Destination Unreachable - Address Unreachable. +.It !H +Parameter Problem - Unrecognized Next Header Type. .It !\& This is printed if the hop limit is <= 1 on a port unreachable message. This means that the packet got to the destination, diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index f8de981cec0d..e237044990f1 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -972,6 +972,10 @@ main(int argc, char *argv[]) ++got_there; break; } + } else if (type == ICMP6_PARAM_PROB && + code == ICMP6_PARAMPROB_NEXTHEADER) { + printf(" !H"); + ++got_there; } else if (type == ICMP6_ECHO_REPLY) { if (rcvhlim >= 0 && rcvhlim <= 1) @@ -1345,7 +1349,9 @@ packet_ok(struct msghdr *mhdr, int cc, int seq, u_char *type, u_char *code) *code = icp->icmp6_code; if ((*type == ICMP6_TIME_EXCEEDED && *code == ICMP6_TIME_EXCEED_TRANSIT) || - (*type == ICMP6_DST_UNREACH)) { + (*type == ICMP6_DST_UNREACH) || + (*type == ICMP6_PARAM_PROB && + *code == ICMP6_PARAMPROB_NEXTHEADER)) { struct ip6_hdr *hip; struct icmp6_hdr *icmp; struct sctp_init_chunk *init; |