On Sat, Sep 03, 2016 at 04:36:04PM +0200, Michal Mazurek wrote: > The code says that the maximum packet size is 131024, but in reality > it's 65527. Values greater than 65527 will cause ping6 to fail: > > $ ping6 -s 100000 ::1 > PING6 ::1 (::1): 100000 data bytes > ping6: sendmsg: Invalid argument > ping6: wrote ::1 100008 chars, ret=-1 > > Document the maximum as 65527, discussed with florian@. > > Also re-break lines so that the formatting of the identical text matches > ping.8. > > Index: sbin/ping6/ping6.8 > =================================================================== > RCS file: /cvs/src/sbin/ping6/ping6.8,v > retrieving revision 1.62 > diff -u -p -r1.62 ping6.8 > --- sbin/ping6/ping6.8 3 Sep 2016 09:18:52 -0000 1.62 > +++ sbin/ping6/ping6.8 3 Sep 2016 14:30:05 -0000 > @@ -181,12 +181,10 @@ when finished. > .\"is a neighbor. > .It Fl s Ar packetsize > Specifies the number of data bytes to be sent. > -The default is 56, which translates into 64 > -ICMP > -data bytes when combined > -with the 8 bytes of > -ICMP > -header data. > +The default is 56, > +which translates into 64 ICMP data bytes > +when combined with the 8 bytes of ICMP header data.
ah, but that is not true: $ ping6 -c1 ::1 PING6 ::1 (::1): 24 data bytes 32 bytes from ::1, icmp_seq=0 hlim=64 time=0.077 ms --- ::1 ping6 statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.077/0.077/0.077/0.000 ms I'm wondering if we should bump this on v6. For now I would suggest to document what's actually happening. +The default is 24, +which translates into 32 ICMP data bytes +when combined with the 8 bytes of ICMPv6 header data. with that OK florian@ > +The maximum packet size is 65527. > .It Fl V Ar rtable > Set the routing table to be used for outgoing packets. > .It Fl v > > -- > Michal Mazurek > -- I'm not entirely sure you are real.