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. +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