X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fnncp-xfer%2Fmain.go;h=41e8c61c8e157f087d9fa5096990d92231bf316d;hb=48a641aeb2476f7dabb5cd4977108a4788e78f24;hp=b65686c8d14b6caa7d271d00053a13574075674d;hpb=a43910e6e9940fe088c38ec849bc983b54335d45;p=nncp.git diff --git a/src/cmd/nncp-xfer/main.go b/src/cmd/nncp-xfer/main.go index b65686c..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 @@ -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") }