]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' 0.5
authorSergey Matveev <stargrave@stargrave.org>
Sun, 5 Feb 2017 08:39:15 +0000 (11:39 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 5 Feb 2017 08:39:15 +0000 (11:39 +0300)
14 files changed:
INSTALL [deleted symlink]
NEWS [deleted symlink]
VERSION
doc/cfg.texi
doc/download.texi
doc/integrity.texi
doc/news.texi
makedist.sh
news_and_install.sh [new file with mode: 0755]
ports/nncp/Makefile
src/cypherpunks.ru/nncp/cmd/nncp-file/main.go
src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go
src/cypherpunks.ru/nncp/pkt.go
src/cypherpunks.ru/nncp/toss.go

diff --git a/INSTALL b/INSTALL
deleted file mode 120000 (symlink)
index a4292cb..0000000
--- a/INSTALL
+++ /dev/null
@@ -1 +0,0 @@
-doc/install.texi
\ No newline at end of file
diff --git a/NEWS b/NEWS
deleted file mode 120000 (symlink)
index 8be52e4..0000000
--- a/NEWS
+++ /dev/null
@@ -1 +0,0 @@
-doc/news.texi
\ No newline at end of file
diff --git a/VERSION b/VERSION
index bd73f47072b1fe4b9914ec14a7f6d47fcc8f816a..2eb3c4fe4eebcdea3da0790cc0ba74cb286ec4f4 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.4
+0.5
index 46cbfae5d853395a1c79b6b5246e7a4961bb824f..653c8013f3b71e4a7ee07f3af47a3faf2b0bde1b 100644 (file)
@@ -118,10 +118,10 @@ forced address specifying.
 Online connection deadline of node inactivity in seconds. It is the time
 connection considered dead after not receiving/sending any packets and
 node must disconnect. By default it is set to 10 seconds -- that means
-that disconnecting after 10 seconds when no packets received and
-transmitted. This can be set to rather high values to keep connection
-alive (to reduce handshake overhead and delays), wait for appearing
-packets ready to send and notifying remote side about their appearance.
+disconnecting after 10 seconds when no packets received and transmitted.
+This can be set to rather high values to keep connection alive (to
+reduce handshake overhead and delays), wait for appearing packets ready
+to send and notifying remote side about their appearance.
 
 @anchor{CfgMaxOnlineTime}
 @item maxonlinetime
index 3539596c596b6ddcac2ac7a5eb82f6601d9c8bfc..102f7687b62e00dab14df53047b395a6af78bfb4 100644 (file)
@@ -23,16 +23,21 @@ Tarballs include all necessary required libraries:
 @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Size @tab Tarball @tab SHA256 checksum
 
-@item 0.1 @tab 720 KiB
-@tab @url{download/nncp-0.1.tar.xz, link} @url{download/nncp-0.1.tar.xz.sig, sign}
-@tab @code{8F71D65B 70865EBF FE802CDF A5C14D00 A9FD6559 FD722E60 5D97E82C 5E2412C2}
+@item @ref{Release 0.4, 0.4} @tab 741 KiB
+@tab @url{download/nncp-0.4.tar.xz, link} @url{download/nncp-0.4.tar.xz.sig, sign}
+@tab @code{93577327 B3DEBFE3 A80BEB0D 8325B2E6 0939EC55 4DBB05F3 4CA34B99 229C3722}
 
-@item @ref{Release 0.2, 0.2} @tab 740 KiB
-@tab @url{download/nncp-0.2.tar.xz, link} @url{download/nncp-0.2.tar.xz.sig, sign}
-@tab @code{00BEAC5A 0C4083B0 42E3152B ACA6FF20 12768B82 CE24D716 8E04279C ECE14DB7}
 
 @item @ref{Release 0.3, 0.3} @tab 741 KiB
 @tab @url{download/nncp-0.3.tar.xz, link} @url{download/nncp-0.3.tar.xz.sig, sign}
 @tab @code{6E76EC5E 6B575C65 BF2D6388 870F2A1C 417D63E4 1628CAA1 BB499D0D 0634473B}
 
+@item @ref{Release 0.2, 0.2} @tab 740 KiB
+@tab @url{download/nncp-0.2.tar.xz, link} @url{download/nncp-0.2.tar.xz.sig, sign}
+@tab @code{00BEAC5A 0C4083B0 42E3152B ACA6FF20 12768B82 CE24D716 8E04279C ECE14DB7}
+
+@item 0.1 @tab 720 KiB
+@tab @url{download/nncp-0.1.tar.xz, link} @url{download/nncp-0.1.tar.xz.sig, sign}
+@tab @code{8F71D65B 70865EBF FE802CDF A5C14D00 A9FD6559 FD722E60 5D97E82C 5E2412C2}
+
 @end multitable
index baa8765a7be6448e5d1fc83285b22e5e5a2aad9b..a88f1b2744de8abbee0e6e05d330db1563ad29ca 100644 (file)
@@ -18,9 +18,6 @@ uid   NNCP releases <releases at nncpgo dot org>
 
 @itemize
 
-@item This website @ref{Contacts, alternates} and maillist containing
-public key fingerprint.
-
 @item
 @verbatim
 % gpg --keyserver hkp://keys.gnupg.net/ --recv-keys 0x2B25868E75A1A953
index 9d83b01e348bb20be5b17b23b0279eefd16c12e0..0105b90be168aec5d610d79f800c902b8aa42d23 100644 (file)
@@ -1,6 +1,30 @@
 @node News
 @unnumbered News
 
+@node Release 0.5
+@section Release 0.5
+@itemize
+@item Trivial small fix in default niceness level of @command{nncp-file}
+and @command{nncp-freq} commands.
+@end itemize
+
+@node Release 0.4
+@section Release 0.4
+@itemize
+@item Small fix in @command{nncp-call}, @command{nncp-caller},
+@command{nncp-daemon}: they can segmentation fail sometimes (no data is
+lost).
+@item @command{nncp-newnode} renamed to @command{nncp-newcfg} -- it is
+shorter and more convenient to use.
+@item @command{nncp-mincfg} command appeared: helper allowing to create
+minimalistic stripped down configuration files without private keys,
+that is useful during @command{nncp-xfer} usage.
+@end itemize
+
+@node Release 0.3
+@section Release 0.3
+Fixed compatibility with Go 1.6.
+
 @node Release 0.2
 @section Release 0.2
 @itemize
@@ -9,30 +33,15 @@ changed too): size field is encrypted and is not send in plaintext
 anymore.
 @item @option{-minsize} option gives ability to automatically pad
 outgoing packets to specified minimal size.
-@item @ref{nncp-daemon} and @ref{nncp-call}/@ref{nncp-caller} always
-check new @emph{tx} packets appearance in the background while
-connected. Remote side is immediately notified.
+@item @command{nncp-daemon} and
+@command{nncp-call}/@command{nncp-caller} always check new @emph{tx}
+packets appearance in the background while connected. Remote side is
+immediately notified.
 @item @option{-onlinedeadline} option gives ability to configure timeout
 of inactivity of online connection, when it could be disconnected. It
 could be used to keep connection alive for a long time.
 @item @option{-maxonlinetime} option gives ability to set maximal
 allowable online connection aliveness time.
-@item @ref{nncp-caller} command appeared: cron-ed TCP daemon caller.
-@item @ref{nncp-pkt} command can decompress the data.
-@end itemize
-
-@node Release 0.3
-@section Release 0.3
-Fixed compatibility with Go 1.6.
-
-@node Release 0.4
-@section Release 0.4
-@itemize
-@item Small fix in @ref{nncp-call}, @ref{nncp-caller},
-@ref{nncp-daemon}: they can segmentation fail sometimes (no data is lost).
-@item @command{nncp-newnode} renamed to @ref{nncp-newcfg} -- it is
-shorter and more convenient to use.
-@item @ref{nncp-mincfg} command appeared: helper allowing to create
-minimalistic stripped down configuration files without private keys,
-that is useful during @ref{nncp-xfer} usage.
+@item @command{nncp-caller} command appeared: cron-ed TCP daemon caller.
+@item @command{nncp-pkt} command can decompress the data.
 @end itemize
index ef8f17adf2dcae87bf216749d06cb7a38c1aee06..f6a8f0e0df0d1d7c43e823fc6fe89e35196f2561 100755 (executable)
@@ -71,7 +71,8 @@ You can obtain releases source code prepared tarballs on
 @url{http://www.nncpgo.org/}.
 EOF
 make -C doc
-rm -r doc/.well-known doc/nncp.html/.well-known
+./news_and_install.sh
+rm -r doc/.well-known doc/nncp.html/.well-known news_and_install.sh
 
 find . -name .git -type d | xargs rm -fr
 find . -name .gitignore -delete
diff --git a/news_and_install.sh b/news_and_install.sh
new file mode 100755 (executable)
index 0000000..8129fc7
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+texi=`mktemp`
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+
+`cat doc/news.texi`
+
+@bye
+EOF
+makeinfo --plaintext -o NEWS $texi
+rm -f $texi
+
+texi=$(TMPDIR=doc mktemp)
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+
+@include install.texi
+
+@bye
+EOF
+makeinfo --plaintext -o INSTALL $texi
+rm -f $texi
index eedf3cf8b13e906c3be870f9aa40e12cc443837c..309cff8401c0c6a6a2c7d7606db843303a44b1b5 100644 (file)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=      nncp
-PORTVERSION=   0.4
+PORTVERSION=   0.5
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/ \
                http://sourceforge.net/projects/nncp/files/
index 3291c3a7ed61398a7a8af085b7d8803081019d0d..4fafc4834b845dd2965f47b2fb17d54216b6e79d 100644 (file)
@@ -40,7 +40,7 @@ func usage() {
 func main() {
        var (
                cfgPath  = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
-               niceRaw  = flag.Int("nice", nncp.DefaultNiceMail, "Outbound packet niceness")
+               niceRaw  = flag.Int("nice", nncp.DefaultNiceFile, "Outbound packet niceness")
                minSize  = flag.Uint64("minsize", 0, "Minimal required resulting packet size")
                quiet    = flag.Bool("quiet", false, "Print only errors")
                debug    = flag.Bool("debug", false, "Print debug messages")
index 2641da01046b89846fa4c154230d7a12ae7f0592..d570bdfcc232f8fb1314fe4f4b7b1a162bee1658 100644 (file)
@@ -40,7 +40,7 @@ func usage() {
 func main() {
        var (
                cfgPath  = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
-               niceRaw  = flag.Int("nice", nncp.DefaultNiceMail, "Outbound packet niceness")
+               niceRaw  = flag.Int("nice", nncp.DefaultNiceFreq, "Outbound packet niceness")
                minSize  = flag.Uint64("minsize", 0, "Minimal required resulting packet size")
                quiet    = flag.Bool("quiet", false, "Print only errors")
                debug    = flag.Bool("debug", false, "Print debug messages")
index ce85ec2e853581358bd0ea1fc3671c72f61009f6..b35f83e3ee969f6fdaad031ae3972b83b8cf04bb 100644 (file)
@@ -47,7 +47,7 @@ const (
        MaxPathSize = 1<<8 - 1
 
        DefaultNiceMail = 64
-       DefaultNiceFreq = 196
+       DefaultNiceFreq = 64
        DefaultNiceFile = 196
 )
 
index 9d17053e665ac760ed33e23ba86634ebefc7aa4a..8a48e91d50a4d7eab80d5fa09041032763e1a9b4 100644 (file)
@@ -163,6 +163,11 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun bool) bool {
                case PktTypeFile:
                        dst := string(pkt.Path[:int(pkt.PathLen)])
                        sds := SdsAdd(sds, SDS{"type": "file", "dst": dst})
+                       if filepath.IsAbs(dst) {
+                               ctx.LogE("rx", sds, "non-relative destination path")
+                               isBad = true
+                               goto Closing
+                       }
                        incoming := ctx.Neigh[*job.PktEnc.Sender].Incoming
                        if incoming == nil {
                                ctx.LogE("rx", sds, "incoming is not allowed")
@@ -237,6 +242,11 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun bool) bool {
                        }
                case PktTypeFreq:
                        src := string(pkt.Path[:int(pkt.PathLen)])
+                       if filepath.IsAbs(src) {
+                               ctx.LogE("rx", sds, "non-relative source path")
+                               isBad = true
+                               goto Closing
+                       }
                        sds := SdsAdd(sds, SDS{"type": "freq", "src": src})
                        dstRaw, err := ioutil.ReadAll(pipeR)
                        if err != nil {