On Sat, Jul 08, 2023 at 11:38:23AM +0200, László Böszörményi (GCS) wrote: > Hi Bjarni, > > On Fri, Jul 7, 2023 at 11:03???PM Bjarni Ingi Gislason <[email protected]> > wrote: > > Package: traceroute > > Version: 1:2.1.2-1 > > Severity: minor > > Tags: patch > [...] > > here are some notes and fixes for the man page. > Thanks for all your work. Can you please: > 1) Send your patch to traceroute upstream[1]? > 2) Alternatively send me the patch as an attachment (do not paste it > inline the email) and I will send your fixes upstream.
The patch is in the attachment.
--- traceroute.db.1 2023-07-07 19:57:03.000000000 +0000 +++ traceroute.db.1.new 2023-07-07 20:18:28.000000000 +0000 @@ -10,19 +10,19 @@ traceroute \- print the route packets tr .BR traceroute " [" \-46dFITUnreAV "] [" "\-f first_ttl" "] [" "\-g gate,..." ] .br .ti +8 -.BR "" [ "-i device" "] [" "-m max_ttl" "] [" "-p port" "] [" "-s src_addr" ] +.BR "" [ "\-i device" "] [" "\-m max_ttl" "] [" "\-p port" "] [" "\-s src_addr" ] .br .ti +8 -.BR "" [ "-q nqueries" "] [" "-N squeries" "] [" "-t tos" ] +.BR "" [ "\-q nqueries" "] [" "\-N squeries" "] [" "\-t tos" ] .br .ti +8 -.BR "" [ "-l flow_label" "] [" "-w waittimes" "] [" "-z sendwait" "] [" "-UL" "] [" "-D" ] +.BR "" [ "\-l flow_label" "] [" "\-w waittimes" "] [" "\-z sendwait" "] [" "\-UL" "] [" "\-D" ] .br .ti +8 -.BR "" [ "-P proto" "] [" "--sport=port" "] [" "-M method" "] [" "-O mod_options" ] +.BR "" [ "\-P proto" "] [" "\-\-sport=port" "] [" "\-M method" "] [" "\-O mod_options" ] .br .ti +8 -.BR "" [ "--mtu" "] [" "--back" ] +.BR "" [ "\-\-mtu" "] [" "\-\-back" ] .br .ti +8 .BR host " [" "packet_len" "]" @@ -53,8 +53,8 @@ is equivalent to .I traceroute .B \-T .P -.I lft -, the Layer Four Traceroute, performs a TCP traceroute, like +.IR lft , +the Layer Four Traceroute, performs a TCP traceroute, like .I traceroute .B \-T , but attempts to provide compatibility with the original @@ -62,7 +62,7 @@ such implementation, also called "lft". .PP The only required parameter is the name or IP address of the destination -.BR host \ . +.BR host . The optional .B packet_len\fR`gth is the total size of the probing packet (default 60 bytes @@ -74,8 +74,9 @@ internet host by launching probe packets with a small ttl (time to live) then listening for an ICMP "time exceeded" reply from a gateway. We start our probes with a ttl of one and increase by one until we get an ICMP "port -unreachable" (or TCP reset), which means we got to the "host", or hit a max (which -defaults to 30 hops). Three probes (by default) are sent at each ttl setting +unreachable" (or TCP reset), which means we got to the "host", +or hit a max (which defaults to 30 hops). +Three probes (by default) are sent at each ttl setting and a line is printed showing the ttl, address of the gateway and round trip time of each probe. The address can be followed by additional information when requested. If the probe answers come from @@ -139,37 +140,34 @@ Use ICMP ECHO for probes .B \-T, \-\-tcp Use TCP SYN for probes .TP -.B \-d, --debug +.B \-d, \-\-debug Enable socket level debugging (when the Linux kernel supports it) .TP -.B \-F, --dont-fragment -Do not fragment probe packets. (For IPv4 it also sets DF bit, which tells +.B \-F, \-\-dont-fragment +Do not fragment probe packets. +(For IPv4 it also sets DF bit, which tells intermediate routers not to fragment remotely as well). -.br -.br Varying the size of the probing packet by the .B packet_len command line parameter, you can manually obtain information about the MTU of individual network hops. The -.B \--mtu +.B \-\-mtu option (see below) tries to do this automatically. -.br -.br Note, that non-fragmented features (like .B \-F or -.B \--mtu\fR) +.B \-\-mtu\fR) work properly since the Linux kernel 2.6.22 only. Before that version, IPv6 was always fragmented, IPv4 could use the once the discovered final mtu only (from the route cache), which can be less than the actual mtu of a device. .TP -.BI \-f " first_ttl" ", --first=" first_ttl +.BI \-f " first_ttl" ", \-\-first=" first_ttl Specifies with what TTL to start. Defaults to 1. .TP -.BI \-g " gateway" ", --gateway=" gateway +.BI \-g " gateway" ", \-\-gateway=" gateway Tells traceroute to add an IP source routing option to the outgoing packet that tells the network to route the packet through the specified @@ -184,18 +182,18 @@ is allowed, where is a route header type (default is type 2). Note the type 0 route header is now deprecated (rfc5095). .TP -.BI \-i " interface" ", --interface=" interface +.BI \-i " interface" ", \-\-interface=" interface Specifies the interface through which .I traceroute should send packets. By default, the interface is selected according to the routing table. .TP -.BI \-m " max_ttl" ", --max-hops=" max_ttl +.BI \-m " max_ttl" ", \-\-max-hops=" max_ttl Specifies the maximum number of hops (max time-to-live value) .I traceroute will probe. The default is 30. .TP -.BI \-N " squeries" ", --sim-queries=" squeries +.BI \-N " squeries" ", \-\-sim-queries=" squeries Specifies the number of probe packets sent out simultaneously. Sending several probes concurrently can speed up .I traceroute @@ -207,7 +205,7 @@ a situation specifying too large number .B \-n Do not try to map IP addresses to host names when displaying them. .TP -.BI \-p " port" ", --port=" port +.BI \-p " port" ", \-\-port=" port For UDP tracing, specifies the destination port base .I traceroute will use (the destination port number will be incremented by each probe). @@ -219,28 +217,24 @@ For TCP and others specifies just the (c port to connect. When using the tcptraceroute wrapper, \-p specifies the source port. .TP -.BI \-t " tos" ", --tos=" tos +.BI \-t " tos" ", \-\-tos=" tos For IPv4, set the Type of Service (TOS) and Precedence value. Useful values are 16 (low delay) and 8 (high throughput). Note that in order to use some TOS precedence values, you have to be super user. .br For IPv6, set the Traffic Control value. .TP -.BI \-l " flow_label" ", --flowlabel=" flow_label +.BI \-l " flow_label" ", \-\-flowlabel=" flow_label Use specified flow_label for IPv6 packets. .TP -.BI \-w " max\fR[\fB,\fIhere\fB,\fInear\fR]" ", --wait=" max\fR[\fB,\fIhere\fB,\fInear\fR] +.BI \-w " max\fR[\fB,\fIhere\fB,\fInear\fR]" ", \-\-wait=" max\fR[\fB,\fIhere\fB,\fInear\fR] Determines how long to wait for a response to a probe. -.br -.br There are three (in general) float values separated by a comma (or a slash). .I Max specifies the maximum time (in seconds, default 5.0) to wait, in any case. -.br -.br Traditional traceroute implementation always waited whole .I max seconds for any probe. But if we already have some replies from the @@ -249,15 +243,13 @@ hop, or even from some .B next hop, we can use the round trip time of such a reply as a hint to determine the actual reasonable amount of time to wait. -.br -.br The optional .I here (default 3.0) specifies a factor to multiply the round trip time of an already received response from the .B same -hop. The resulting value is used as a timeout for the probe, instead of +hop. The resulting value is used as a timeout for the probe, instead of (but no more than) .IR max . The optional @@ -266,9 +258,7 @@ The optional .B next hop. (The time of the first found result is used in both cases). -.br -.br First, we look for the .B same hop (of the probe which will be printed first from now). @@ -289,7 +279,7 @@ are always set to zero if only .I max is specified (for compatibility with previous versions). .TP -.BI \-q " nqueries" ", --queries=" nqueries +.BI \-q " nqueries" ", \-\-queries=" nqueries Sets the number of probe packets per hop. The default is 3. .TP .B \-r @@ -298,12 +288,12 @@ an attached network. If the host is not network, an error is returned. This option can be used to ping a local host through an interface that has no route through it. .TP -.BI \-s " source_addr" ", --source=" source_addr +.BI \-s " source_addr" ", \-\-source=" source_addr Chooses an alternative source address. Note that you must select the address of one of the interfaces. By default, the address of the outgoing interface is used. .TP -.BI \-z " sendwait" ", --sendwait=" sendwait +.BI \-z " sendwait" ", \-\-sendwait=" sendwait Minimal time interval between probes (default 0). If the value is more than 10, then it specifies a number in milliseconds, else it is a number of seconds (float point values allowed too). @@ -325,27 +315,26 @@ directly after the corresponding address .TP .B \-V, \-\-version Print the version and exit. -.br .P There are additional options intended for advanced usage (such as alternate trace methods etc.): .TP -.B \--sport\fR=\fIport +.B \-\-sport\fR=\fIport Chooses the source port to use. Implies -.B \-N\ 1\fR\ -w\ 5 . +.B \-N\ 1\ \-w\ 5.0\fR. Normally source ports (if applicable) are chosen by the system. .TP -.B \--fwmark\fR=\fImark +.B \-\-fwmark\fR=\fImark Set the firewall mark for outgoing packets (since the Linux kernel 2.6.25). .TP -.BI \-M " method" ", --module=" name +.BI \-M " method" ", \-\-module=" name Use specified method for traceroute operations. Default traditional udp method has name .IR default , icmp -.BR "" ( "-I" ) " +.BR "" ( "\-I" ) and tcp -.BR "" ( "-T" ) " +.BR "" ( "\-T" ) have names .I icmp and @@ -353,13 +342,14 @@ and respectively. .br Method-specific options can be passed by -.BR \-O\ . +.BR \-O . Most methods have their simple shortcuts, -.BR "" ( "-I " means " -M icmp" , +.BR "" ( "\-I " means " \-M icmp" , etc). .TP -.BI \-O " option" ", --options=" options -Specifies some method-specific option. Several options are separated by comma (or use several +.BI \-O " option" ", \-\-options=" options +Specifies some method-specific option. +Several options are separated by comma (or use several .B \-O on cmdline). Each method may have its own specific options, or many not have them at all. @@ -376,7 +366,7 @@ Use UDPLITE for tracerouting (default po .B \-D, \-\-dccp Use DCCP Requests for probes. .TP -.BI \-P " protocol" ", --protocol=" protocol +.BI \-P " protocol" ", \-\-protocol=" protocol Use raw packet of specified protocol for tracerouting. Default protocol is 253 (rfc3692). .TP @@ -389,11 +379,10 @@ is printed once in a form of .B F=\fINUM at the first probe of a hop which requires such .I mtu -to be reached. (Actually, the correspond "frag needed" icmp message +to be reached. +(Actually, the correspond "frag needed" icmp message normally is sent by the previous hop). -.br -.br Note, that some routers might cache once the seen information on a fragmentation. Thus you can receive the final mtu from a closer hop. Try to specify an unusual @@ -410,7 +399,7 @@ option for more info. Print the number of backward hops when it seems different with the forward direction. This number is guessed in assumption that remote hops send reply packets with initial ttl set to either 64, or 128 or 255 (which seems -a common practice). It is printed as a negate value in a form of '-NUM' . +a common practice). It is printed as a negate value in a form of \&'\-NUM'. .SH LIST OF AVAILABLE METHODS In general, a particular traceroute method may have to be chosen by .BR \-M\ name , @@ -430,7 +419,9 @@ This method is allowed for unprivileged .SS icmp \ \ \ \-I Most usual method for now, which uses icmp echo packets for probes. .br -If you can ping(8) the destination host, icmp tracerouting is applicable +If you can +.BR ping (8) +the destination host, icmp tracerouting is applicable as well. .P This method may be allowed for unprivileged users @@ -516,13 +507,15 @@ other useful things. Default options is .BR syn,sysctl . .SS tcpconn -An initial implementation of tcp method, simple using connect(2) call, +An initial implementation of tcp method, simple using +.BR connect (2) +call, which does full tcp session opening. Not recommended for normal use, because a destination application is always affected (and can be confused). .SS udp \ \ \ \ \-U Use udp datagram with constant destination port (default 53, dns). .br -Intended to bypass firewall as well. +Intended to bypass firewall as well. .P Note, that unlike in .I tcp @@ -530,7 +523,8 @@ method, the correspond application on th .B always receive our probes (with random data), and most can easily be confused by them. Most cases it will not respond to our packets though, so we will never -see the final hop in the trace. (Fortunately, it seems that at least +see the final hop in the trace. +(Fortunately, it seems that at least dns servers replies with something angry). .P This method is allowed for unprivileged users. @@ -564,7 +558,7 @@ Send raw packet of protocol No protocol-specific headers are used, just IP header only. .br Implies -.B \-N\ 1\fR\ -w\ 5 . +.B \-N\ 1\ \-w\ 5.0\fR. .br Options: .TP @@ -573,13 +567,12 @@ Use IP protocol .I proto (default 253). .SH NOTES -.PP To speed up work, normally several probes are sent simultaneously. On the other hand, it creates a "storm of packages", especially in the reply direction. Routers can throttle the rate of icmp responses, and some of replies can be lost. To avoid this, decrease the number of simultaneous probes, or even set it to 1 (like in initial traceroute -implementation), i.e. +implementation), i.e.\& .B \-N 1 .PP The final (target) host can drop some of the simultaneous probes, @@ -606,7 +599,7 @@ with the desired timeout only (for examp .PP If some hops report nothing for every method, the last chance to obtain something is to use -.B ping -R +.B ping \-R command (IPv4, and for nearest 8 hops only). .SH SEE ALSO .BR ping (8),

