Page MenuHomeFreeBSD

traceroute6: Don't keep trying on unreachables
AcceptedPublic

Authored by otis on Nov 11 2024, 10:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 19, 7:09 AM
Unknown Object (File)
Fri, Jan 17, 9:08 AM
Unknown Object (File)
Fri, Jan 10, 10:09 PM
Unknown Object (File)
Fri, Jan 10, 5:21 PM
Unknown Object (File)
Thu, Jan 9, 11:02 AM
Unknown Object (File)
Mon, Jan 6, 6:54 AM
Unknown Object (File)
Mon, Jan 6, 2:14 AM
Unknown Object (File)
Sun, Jan 5, 11:53 PM
Subscribers
None

Details

Summary

Stop probing after receiving ICMP6_DST_UNREACH.

The behavior can be observed by tracing the route to
2a02:ee80:4028:1126::

Discussed with: Job Snijders, Nick Hilliard
Obtained from: OpenBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 60500
Build 57384: arc lint + arc unit

Event Timeline

otis requested review of this revision.Nov 11 2024, 10:43 PM
otis created this revision.

Not that it matters, but Linux also does this.
Thank you for the patch!

This revision is now accepted and ready to land.Nov 12 2024, 12:52 AM

Ah... this will require an entry in traceroute6.8 (right before EXIT STATUS), but it can be done before committing, if others also accept this patch.

Print !R on route rejected error and update manual page.

This revision now requires review to proceed.Nov 12 2024, 8:36 AM

Just a couple remarks:

usr.sbin/traceroute6/traceroute6.8
194

I still have hopes of unifying traceroute and traceroute6... while !R is not used by traceroute, ideally both should print the same annotations (they do not), or just the "common" ones.
If you and the other reviewers don't mind, I would prefer just to add a catch-all (default) case to the switch. At some point a letter for each type/code does not add more clarity IMO.
However, if you still think this should deserve its own letter, I won't object.

196
.It !<num>
ICMP unreachable code <num>.

To match traceroute(8)?

otis marked 2 inline comments as done.Nov 12 2024, 1:53 PM
otis added inline comments.
usr.sbin/traceroute6/traceroute6.8
194

I still have hopes of unifying traceroute and traceroute6... while !R is not used by traceroute, ideally both should print the same annotations (they do not), or just the "common" ones.

This is valid point, I'll abandon !R for now, keeping !<num>. And let's do unifying both traceroutes as next step (I also considered that option).

If you and the other reviewers don't mind, I would prefer just to add a catch-all (default) case to the switch. At some point a letter for each type/code does not add more clarity IMO.
However, if you still think this should deserve its own letter, I won't object.

I'm indifferent, too.

otis marked an inline comment as done.
  • Do not print !R
  • Unify ICMPv6 to ICMP6 in manpage

Really update the manpage

This revision is now accepted and ready to land.Nov 12 2024, 9:37 PM
usr.sbin/traceroute6/traceroute6.8
78

I thought ICMPv6 was the preferred way to express it.

The behavior can be observed by tracing the route to 2a02:ee80:4028:1126::

IMO it would be nicer to describe this behaviour in the commit log message. What exactly happens?

The behavior can be observed by tracing the route to 2a02:ee80:4028:1126::

IMO it would be nicer to describe this behaviour in the commit log message. What exactly happens?

While tracing route to a network that rejects the route, traceroute6 keeps trying the next hops even if received the error code 6.

# traceroute6 -I 2a02:ee80:4028:1126::
...
 7  kbn-bb5-v6.ip.twelve99.net  16.832 ms  16.849 ms  17.074 ms
 8  * * *
 9  storegate-ic-310070.ip.twelve99-cust.net  15.934 ms  15.458 ms  15.432 ms
10  2001:2000:1080:30::1  16.163 ms  16.215 ms  16.095 ms
11  2001:2000:1080:30::2  16.256 ms  16.358 ms  16.188 ms
12  2001:2010:e::2  17.999 ms  18.049 ms  17.942 ms
13  2001:2010:e::2  17.785 ms  17.939 ms  17.879 ms
14  2001:2010:e::2  17.805 ms  17.879 ms  17.866 ms
15  2001:2010:e::2  17.855 ms  17.950 ms  17.902 ms
16  2001:2010:e::2  17.874 ms  17.939 ms *
17  2001:2010:e::2  17.912 ms  17.983 ms  17.914 ms
18  2001:2010:e::2  17.812 ms  17.922 ms  17.884 ms
19  2001:2010:e::2  17.909 ms  17.882 ms  17.884 ms
20  2001:2010:e::2  18.006 ms  17.967 ms *
21  2001:2010:e::2  17.935 ms  17.995 ms  17.960 ms
22  2001:2010:e::2  17.844 ms  17.927 ms  17.856 ms
23  2001:2010:e::2  17.976 ms  18.069 ms  17.877 ms
24  2001:2010:e::2  17.918 ms  17.968 ms  17.835 ms
25  2001:2010:e::2  17.835 ms  17.936 ms  17.802 ms
26  2001:2010:e::2  17.881 ms  17.969 ms  17.867 ms
^C

With this patch, the behavior is:

 7  kbn-bb5-v6.ip.twelve99.net (2001:2034:1:75::1)  17.917 ms  18.078 ms  17.838 ms
 8  * * *
 9  storegate-ic-310070.ip.twelve99-cust.net (2001:2035:0:94::2)  17.034 ms  16.859 ms  16.824 ms
10  2001:2000:1080:30::1 (2001:2000:1080:30::1)  17.080 ms  16.984 ms  16.993 ms
11  2001:2000:1080:30::2 (2001:2000:1080:30::2)  17.818 ms  17.527 ms  17.574 ms
12  2001:2010:e::2 (2001:2010:e::2)  19.017 ms  18.977 ms  19.007 ms
13  2001:2010:e::2 (2001:2010:e::2)  18.963 ms !<6>  18.981 ms !<6>  18.950 ms !<6>

and traceroute6 stops after receiving the error code.