X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fnncp-xfer%2Fmain.go;h=41e8c61c8e157f087d9fa5096990d92231bf316d;hb=48a641aeb2476f7dabb5cd4977108a4788e78f24;hp=e565ece351e5eb72a525f2a682e5680104828629;hpb=712399b4547bd499528a20209d469b2eb1aaff28;p=nncp.git diff --git a/src/cmd/nncp-xfer/main.go b/src/cmd/nncp-xfer/main.go index e565ece..41e8c61 100644 --- a/src/cmd/nncp-xfer/main.go +++ b/src/cmd/nncp-xfer/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ import ( "path/filepath" "github.com/dustin/go-humanize" - "go.cypherpunks.ru/nncp/v7" + "go.cypherpunks.ru/nncp/v8" ) func usage() { @@ -218,7 +218,7 @@ func main() { continue } pktEnc, pktEncRaw, err := ctx.HdrRead(fd) - if err != nil { + if err == nil { switch pktEnc.Magic { case nncp.MagicNNCPEv1.B: err = nncp.MagicNNCPEv1.TooOld() @@ -229,6 +229,8 @@ func main() { case nncp.MagicNNCPEv4.B: err = nncp.MagicNNCPEv4.TooOld() case nncp.MagicNNCPEv5.B: + err = nncp.MagicNNCPEv5.TooOld() + case nncp.MagicNNCPEv6.B: default: err = errors.New("is not an encrypted packet") }