Subject: Re: [EN] NNCP 8.0.0 release announcement

From: Sergey Matveev <[email-masked]>
Date: Tue, 9 Nov 2021 13:56:56 +0300

Greetings!

*** John Goerzen [2021-11-08 16:55]:
>I have an odd report.  I'm not using chunked transfers anywhere, but now
>nncp-toss is creating nncp-file files with ".nncp.chunk0" appended to the
>end, and also a ".nncp.meta" file alongside it.

Damned! I explicitly checked everything (as I thought) related to
chunked transfer (I use it much), but missed that basic use-case :-)
Fixed in 8.0.1 release.

Because we do not know payload's size in advance, we have to determine
do we need to turn chunked transfer mode on before we started any
encrypted packet creation (because they contain file's path at the
beginning and we have to know is it only a chunk). So if -chunked (or
freq.chunked) is greater than zero and we do not know size in advance
(using "nncp-file - < foo" instead of "nncp-file foo"), then chunked
mode is turned on. If size is known and less than chunk size, then no
chunked transfer. By default nncp-file has "-chunked -1", meaning "take
freq.chunked as a default value". But by default that chunk size equals
to MaxFileSize=1<<62, meaning that it is greater than zero and chunked
transfer mode turns on.

>(nncp-reass complains "chunk 0: invalid size").

Another bugs, thank you very much for reporting! I checked its
workability without intermediate nodes (no -via) only. It used size of
the "outer" full payload size, but must use only the "internal" payload
size, content's itself. Fixed in 8.0.1 release.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF