@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
@headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
+@item @ref{Release 6.4.0, 6.4.0} @tab 2021-04-22 @tab 1042 KiB
+@tab @url{download/nncp-6.4.0.tar.xz, link} @url{download/nncp-6.4.0.tar.xz.sig, sign}
+@tab @code{3D0D1156 D69AF698 D402663C F84E51CC 3D40A50D 300E34D1 105A6F75 32E4B99B}
+
@item @ref{Release 6.3.0, 6.3.0} @tab 2021-04-14 @tab 1042 KiB
@tab @url{download/nncp-6.3.0.tar.xz, link} @url{download/nncp-6.3.0.tar.xz.sig, sign}
@tab @code{76C26A11 E3423540 BB7B8470 820176A3 5FCD0493 B21A872E C223EB94 43BA466B}
@node Новости
@section Новости
+@node Релиз 6.5.0
+@subsection Релиз 6.5.0
+@itemize
+
+@item
+Исправлено падение в @command{nncp-daemon} когда SP рукопожатие не было успешно.
+
+@item
+Исправлено возможное игнорирование плохого кода возврата автоматического tosser.
+
+@item
+Исправлена гонка при закрытии файловых дескрипторов во время завершения
+работы online протокола, которая могла привести к ошибке записи
+принятого фрагмента пакета.
+
+@item
+Убирать показ прогресса передачи пакетов когда вызов уже завершён в
+@command{nncp-daemon}, @command{nncp-call} and @command{nncp-caller}.
+
+@end itemize
+
@node Релиз 6.4.0
@subsection Релиз 6.4.0
@itemize
See also this page @ref{Новости, on russian}.
+@node Release 6.5.0
+@section Release 6.5.0
+@itemize
+
+@item
+Fixed segfault in @command{nncp-daemon} when SP handshake did not succeed.
+
+@item
+Fixed possible bad return code ignoring in automatic tosser.
+
+@item
+Fixed race during file descriptors closing when online protocol call is
+finished, that could lead to write error of received packet fragment.
+
+@item
+Kill all packet transmission progress bars in @command{nncp-daemon},
+@command{nncp-call} and @command{nncp-caller} when call is finished.
+
+@end itemize
+
@node Release 6.4.0
@section Release 6.4.0
@itemize
PORTNAME= nncp
-DISTVERSION= 6.4.0
+DISTVERSION= 6.5.0
CATEGORIES= net
MASTER_SITES= http://www.nncpgo.org/download/
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
import (
"flag"
"fmt"
+ "log"
"os"
"go.cypherpunks.ru/nncp/v6"
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
)
})
} else {
- nodeId := "unknown"
+ var nodeId string
+ var nodeName string
if state.Node == nil {
+ nodeId = "unknown"
+ nodeName = "unknown"
nodeIdC <- nil
} else {
- nodeIdC <- state.Node.Id
nodeId = state.Node.Id.String()
+ nodeName = state.Node.Name
+ nodeIdC <- state.Node.Id
}
ctx.LogI(
"call-started",
nncp.LEs{{K: "Node", V: nodeId}},
- func(les nncp.LEs) string { return "Connected to " + state.Node.Name },
+ func(les nncp.LEs) string { return "Connected to " + nodeName },
)
}
close(nodeIdC)
autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
const Base32Encoded32Len = 52
var (
- Version string = "6.4.0"
+ Version string = "6.5.0"
Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding)
)
progressBarsLock.Unlock()
}
}
+
+func ProgressKill(pkt string) {
+ progressBarsLock.Lock()
+ pb, exists := progressBars[pkt]
+ if exists {
+ pb.Kill()
+ delete(progressBars, pkt)
+ }
+ progressBarsLock.Unlock()
+}
fdsLock sync.RWMutex
fileHashers map[string]*HasherAndOffset
checkerQueues SPCheckerQueues
+ progressBars map[string]struct{}
sync.RWMutex
}
for range state.pings {
}
}()
- go func() {
- for _, s := range state.fds {
- s.fd.Close()
- }
- }()
}
func (state *SPState) NotAlive() bool {
state.pings = make(chan struct{})
state.infosTheir = make(map[[32]byte]*SPInfo)
state.infosOurSeen = make(map[[32]byte]uint8)
+ state.progressBars = make(map[string]struct{})
state.started = started
state.rxLock = rxLock
state.txLock = txLock
state.pings = make(chan struct{})
state.infosOurSeen = make(map[[32]byte]uint8)
state.infosTheir = make(map[[32]byte]*SPInfo)
+ state.progressBars = make(map[string]struct{})
state.started = started
state.xxOnly = xxOnly
pingTicker.Stop()
return
case now := <-deadlineTicker.C:
- if (now.Sub(state.RxLastNonPing) >= state.onlineDeadline &&
- now.Sub(state.TxLastNonPing) >= state.onlineDeadline) ||
- (state.maxOnlineTime > 0 && state.mustFinishAt.Before(now)) ||
- (now.Sub(state.RxLastSeen) >= 2*PingTimeout) {
- state.SetDead()
- conn.Close() // #nosec G104
+ if now.Sub(state.RxLastNonPing) >= state.onlineDeadline &&
+ now.Sub(state.TxLastNonPing) >= state.onlineDeadline {
+ goto Deadlined
}
+ if state.maxOnlineTime > 0 && state.mustFinishAt.Before(now) {
+ goto Deadlined
+ }
+ if now.Sub(state.RxLastSeen) >= 2*PingTimeout {
+ goto Deadlined
+ }
+ break
+ Deadlined:
+ state.SetDead()
+ conn.Close() // #nosec G104
case now := <-pingTicker.C:
if now.After(state.TxLastSeen.Add(PingTimeout)) {
state.wg.Add(1)
LE{"FullSize", fullSize},
)
if state.Ctx.ShowPrgrs {
+ state.progressBars[pktName] = struct{}{}
Progress("Tx", lesp)
}
state.Lock()
} else {
state.queueTheir = state.queueTheir[:0]
}
+ if state.Ctx.ShowPrgrs {
+ delete(state.progressBars, pktName)
+ }
} else {
state.queueTheir[0].freq.Offset += uint64(len(buf))
}
if txDuration > 0 {
state.TxSpeed = state.TxBytes / txDuration
}
+ for _, s := range state.fds {
+ s.fd.Close()
+ }
+ for pktName := range state.progressBars {
+ ProgressKill(pktName)
+ }
}
func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) {
}
lesp = append(lesp, LE{"FullSize", fullsize})
if state.Ctx.ShowPrgrs {
+ state.progressBars[pktName] = struct{}{}
Progress("Rx", lesp)
}
if fullsize != ourSize {
continue
}
+ if state.Ctx.ShowPrgrs {
+ delete(state.progressBars, pktName)
+ }
logMsg = func(les LEs) string {
return fmt.Sprintf(
"Got packet %s %d%% (%s / %s)",
default:
}
time.Sleep(time.Second)
- bad = !ctx.Toss(nodeId, nice, false, doSeen, noFile, noFreq, noExec, noTrns)
+ bad = !ctx.Toss(nodeId, nice, false, doSeen, noFile, noFreq, noExec, noTrns) || bad
}
}()
return finish, badCode