]> Cypherpunks.ru repositories - govpn.git/commitdiff
Merge branch 'develop' 5.5
authorSergey Matveev <stargrave@stargrave.org>
Sat, 6 Feb 2016 14:53:08 +0000 (17:53 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 6 Feb 2016 14:53:08 +0000 (17:53 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
14 files changed:
THANKS
VERSION
doc/download.texi
doc/example.texi
doc/faq.texi
doc/index.texi
doc/installation.texi
doc/news.ru.texi
doc/news.texi
doc/thanks.texi
src/cypherpunks.ru/govpn/cmd/govpn-client/tcp.go
src/cypherpunks.ru/govpn/cmd/govpn-client/udp.go
src/cypherpunks.ru/govpn/peer.go
utils/makedist.sh

diff --git a/THANKS b/THANKS
index 740d6b38109de82880f578dc99b093d94460f264..38cc203cdb77d4fe31e2ef0e983142e8b4dd26e8 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -4,3 +4,4 @@
 * Watson Ladd <watsonbladd@gmail.com> for suggestion of Elligator (http://elligator.cr.yp.to/) encoding.
 * Password Hashing Competition for Argon2 (https://password-hashing.net/#argon2).
 * Chaffing and Winnowing: Confidentiality without Encryption (http://people.csail.mit.edu/rivest/chaffing-980701.txt) (C) Ronald L. Rivest
+* Zhuoyun Wei <wzyboy@wzyboy.org> for AUR port maintaining and his documentation related fixes.
diff --git a/VERSION b/VERSION
index 37c2d9960ec72414b3941f8f4c1172fb6e3c6e7f..9ad974f6109e4bf8a9c47b6d1870e2b4990d9841 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.4
+5.5
index 8547bfa6478bb3facdb3ab3ea671aa7c892e9afa..a8710f083df2b46630020c5c46508c9d6243882d 100644 (file)
@@ -6,6 +6,10 @@ You can obtain releases source code prepared tarballs from the links below:
 @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 5.4, 5.4} @tab 310 KiB
+@tab @url{download/govpn-5.4.tar.xz, link} @url{download/govpn-5.4.tar.xz.sig, sign}
+@tab @code{a1a001d9ef899ff6b61872eb7d2425a09eb0161574f50c8da6e4b14beb9b0ff6}
+
 @item @ref{Release 5.3, 5.3} @tab 301 KiB
 @tab @url{download/govpn-5.3.tar.xz, link} @url{download/govpn-5.3.tar.xz.sig, sign}
 @tab @code{50955d0a2ea41236682cb5ac245210691fb6ecbe88d138c5873e2362e547da48}
index 1271a02174dada0477f55f3844a0c34dcfccc00e..619e9c620aa406e2c6c5fd71b3410b19bcf5dff3 100644 (file)
@@ -46,7 +46,7 @@ Alice:
 
 @verbatim
 server% ip addr add 192.168.0.1/24 dev wlan0
-server% tunctl -t tap10
+server% ip tuntap add dev tap10 mode tap
 server% ip addr add 172.16.0.1/24 dev tap10
 server% ip link set up dev tap10
 @end verbatim
@@ -61,7 +61,7 @@ server% govpn-server -bind 192.168.0.1:1194
 
 @verbatim
 client% ip addr add 192.168.0.2/24 dev wlan0
-client% tunctl -t tap10
+client% ip tuntap add dev tap10 mode tap
 client% ip addr add 172.16.0.2/24 dev tap10
 client% ip link set up dev tap10
 client% ip route add default via 172.16.0.1
index 3574f452ebbfb6cd027b009c9a4d9b258d5766de..4ecc22287af84090f87c7a5bfd0670f127c3f0a9 100644 (file)
@@ -140,7 +140,7 @@ identity is known to server and that it is exactly GoVPN server.
 Timesync option forces adding timestamps to each handshake packet
 allowing only specified time window of packet validness. If you have got
 more or less synchronized clocks between your clients and server, then
-you can use always use this option.
+you can always use this option.
 
 @node Can I DoS daemon
 @section Can I DoS (denial of service) the daemon?
index a2aa99e84b634845d06665d15b2fca007a1bc60a..e8b91e875cdfea7730f9c907135fd7fe0d053ea2 100644 (file)
@@ -1,5 +1,4 @@
 \input texinfo
-@setfilename govpn.info
 @documentencoding UTF-8
 @settitle GoVPN
 
index b6cb7d8ae5fe3ec9ed6b4f8fbf5e33e44082e49f..dd121dbb1c2f12c0fbeff5f933033050df55e487 100644 (file)
@@ -13,10 +13,10 @@ and you have to install Go compiler (1.5+ version is highly recommended,
 1.4 is the minimal sufficient): @code{lang/go} port in FreeBSD and
 @code{golang} package in most GNU/Linux distributions. @emph{Make} (BSD
 and GNU ones are fine) is recommended for convenient building.
-@url{https://www.gnu.org/software/texinfo/, Texinfo} is used for
-building documentation. Possibly you also need to install TUN/TAP
-interface utilities (depending on your operating system):
-@code{uml-utilities} package in most GNU/Linux distributions.
+@url{https://www.gnu.org/software/texinfo/, Texinfo} (6.1+ version is
+recommended) is used for building documentation. Possibly you also need
+to install TUN/TAP interface utilities (depending on your operating
+system): @code{uml-utilities} package in most GNU/Linux distributions.
 
 Included required libraries:
 
index 980cace9cd5d73a65180f5921ceb59cfe6f51116..5e8efbed94145962f4daf1522abc3959d74cc87c 100644 (file)
@@ -1,32 +1,12 @@
 @node Новости
 @section Новости
 
-@menu
-* Релиз 5.4::
-* Релиз 5.3::
-* Релиз 5.2::
-* Релиз 5.1::
-* Релиз 5.0::
-* Релиз 4.2::
-* Релиз 4.1::
-* Релиз 4.0::
-* Релиз 3.5::
-* Релиз 3.4::
-* Релиз 3.3::
-* Релиз 3.2::
-* Релиз 3.1::
-* Релиз 3.0::
-* Релиз 2.4::
-* Релиз 2.3::
-* Релиз 2.2::
-* Релиз 2.1::
-* Релиз 2.0::
-* Релиз 1.5::
-* Релиз 1.4::
-* Релиз 1.3::
-* Релиз 1.1::
-* Релиз 1.0::
-@end menu
+@node Релиз 5.5
+@subsection Релиз 5.5
+@itemize
+@item Возможность работы на 32-х битных платформах. @emph{sync/atomic}
+библиотека имеет особенности из-за которых предыдущие версии паниковали.
+@end itemize
 
 @node Релиз 5.4
 @subsection Релиз 5.4
index c96fdb9fc5674d16301ece4fcb7d2c82a033318f..a33f4150c8a4475e8d6d12b85132ff28460c5dd7 100644 (file)
@@ -3,32 +3,12 @@
 
 See also this page @ref{Новости, on russian}.
 
-@menu
-* Release 5.4::
-* Release 5.3::
-* Release 5.2::
-* Release 5.1::
-* Release 5.0::
-* Release 4.2::
-* Release 4.1::
-* Release 4.0::
-* Release 3.5::
-* Release 3.4::
-* Release 3.3::
-* Release 3.2::
-* Release 3.1::
-* Release 3.0::
-* Release 2.4::
-* Release 2.3::
-* Release 2.2::
-* Release 2.1::
-* Release 2.0::
-* Release 1.5::
-* Release 1.4::
-* Release 1.3::
-* Release 1.1::
-* Release 1.0::
-@end menu
+@node Release 5.5
+@section Release 5.5
+@itemize
+@item Ability to work on 32-bit platforms. @emph{sync/atomic} library
+has some specific issues that caused panics on previous versions.
+@end itemize
 
 @node Release 5.4
 @section Release 5.4
index 238d2fbf0f49a6f5cb9af614062d5afad1e15457..eebdedd80302c0bf42022ee78ec3867999f36ddc 100644 (file)
@@ -10,4 +10,5 @@ Thanks for contributions and suggestions to:
 @item @email{watsonbladd@@gmail.com, Watson Ladd} for suggestion of @url{http://elligator.cr.yp.to/, Elligator} encoding.
 @item @url{https://password-hashing.net/#argon2, Password Hashing Competition for Argon2}.
 @item @url{http://people.csail.mit.edu/rivest/chaffing-980701.txt, Chaffing and Winnowing: Confidentiality without Encryption} @copyright{} Ronald L. Rivest
+@item @email{wzyboy@@wzyboy.org, Zhuoyun Wei} for @url{https://aur.archlinux.org/packages/govpn/, AUR} port maintaining and his documentation related fixes.
 @end itemize
index 7e2b1a3db9db896d1fcf27b20dbe7ccc0f37db3b..dd353649ad4db37ee0f2a1b0b673b7e7d71b2a76 100644 (file)
@@ -151,7 +151,7 @@ TransportCycle:
                        timeouted <- struct{}{}
                        break TransportCycle
                }
-               if atomic.LoadInt64(&peer.BytesIn)+atomic.LoadInt64(&peer.BytesOut) > govpn.MaxBytesPerKey {
+               if atomic.LoadUint64(&peer.BytesIn)+atomic.LoadUint64(&peer.BytesOut) > govpn.MaxBytesPerKey {
                        log.Println("Need rehandshake")
                        rehandshaking <- struct{}{}
                        break TransportCycle
index 3d0c421bd4168683ade366abf0bc54302affc2a7..c70cf46c1ea2c3e8a22b5f8fdded82ef43b7a243 100644 (file)
@@ -70,7 +70,7 @@ MainCycle:
                                log.Println("Unauthenticated packet")
                                timeouts++
                        }
-                       if atomic.LoadInt64(&peer.BytesIn)+atomic.LoadInt64(&peer.BytesOut) > govpn.MaxBytesPerKey {
+                       if atomic.LoadUint64(&peer.BytesIn)+atomic.LoadUint64(&peer.BytesOut) > govpn.MaxBytesPerKey {
                                log.Println("Need rehandshake")
                                rehandshaking <- struct{}{}
                                break MainCycle
index 5ea245bbd44a02aa196c66801b3bd22b4c3f19f3..a9c0aaae8dbe386dad397e2df97aaea3a7ee9d03 100644 (file)
@@ -39,7 +39,7 @@ const (
        // S20BS is Salsa20's internal blocksize in bytes
        S20BS = 64
        // Maximal amount of bytes transfered with single key (4 GiB)
-       MaxBytesPerKey int64 = 1 << 32
+       MaxBytesPerKey uint64 = 1 << 32
        // Heartbeat rate, relative to Timeout
        TimeoutHeartbeat = 4
        // Minimal valid packet length
@@ -64,6 +64,19 @@ func newNonceCipher(key *[32]byte) *xtea.Cipher {
 }
 
 type Peer struct {
+       // Statistics (they are at the beginning for correct int64 alignment)
+       BytesIn         uint64
+       BytesOut        uint64
+       BytesPayloadIn  uint64
+       BytesPayloadOut uint64
+       FramesIn        uint64
+       FramesOut       uint64
+       FramesUnauth    uint64
+       FramesDup       uint64
+       HeartbeatRecv   uint64
+       HeartbeatSent   uint64
+
+       // Basic
        Addr string
        Id   *PeerId
        Conn io.Writer
@@ -95,18 +108,6 @@ type Peer struct {
        LastSent      time.Time
        willSentCycle time.Time
 
-       // Statistics
-       BytesIn         int64
-       BytesOut        int64
-       BytesPayloadIn  int64
-       BytesPayloadOut int64
-       FramesIn        int
-       FramesOut       int
-       FramesUnauth    int
-       FramesDup       int
-       HeartbeatRecv   int
-       HeartbeatSent   int
-
        // Receiver
        BusyR    sync.Mutex `json:"-"`
        bufR     []byte
@@ -241,7 +242,7 @@ func (p *Peer) EthProcess(data []byte) {
                // accept the next one
                copy(p.bufT[S20BS:], data)
                p.bufT[S20BS+len(data)] = PadByte
-               p.BytesPayloadOut += int64(len(data))
+               p.BytesPayloadOut += uint64(len(data))
        }
 
        if p.NoiseEnable && !p.Encless {
@@ -278,7 +279,7 @@ func (p *Peer) EthProcess(data []byte) {
                )
                copy(p.keyAuthT[:], p.bufT[:SSize])
                poly1305.Sum(p.tagT, p.frameT, p.keyAuthT)
-               atomic.AddInt64(&p.BytesOut, int64(len(p.frameT)+TagSize))
+               atomic.AddUint64(&p.BytesOut, uint64(len(p.frameT)+TagSize))
                out = append(p.tagT[:], p.frameT...)
        }
        p.FramesOut++
@@ -376,7 +377,7 @@ func (p *Peer) PktProcess(data []byte, tap io.Writer, reorderable bool) bool {
        }
 
        p.FramesIn++
-       atomic.AddInt64(&p.BytesIn, int64(len(data)))
+       atomic.AddUint64(&p.BytesIn, uint64(len(data)))
        p.LastPing = time.Now()
        p.pktSizeR = bytes.LastIndexByte(out, PadByte)
        if p.pktSizeR == -1 {
@@ -396,7 +397,7 @@ func (p *Peer) PktProcess(data []byte, tap io.Writer, reorderable bool) bool {
                p.BusyR.Unlock()
                return true
        }
-       p.BytesPayloadIn += int64(p.pktSizeR)
+       p.BytesPayloadIn += uint64(p.pktSizeR)
        tap.Write(out[:p.pktSizeR])
        p.BusyR.Unlock()
        return true
index 278ee2db7a1732de490c197e7474a6d264c14c36..a0246209605748cb5d55a51a6e7c1bffdb3fbf2b 100755 (executable)
@@ -63,7 +63,7 @@ size=$(( $(cat $tarball | wc -c) / 1024 ))
 hash=$($SHA256 $tarball | sed 's/^.*\([0-9a-f]\{64\}\).*$/\1/')
 cat <<EOF
 An entry for documentation:
-@item @ref{Release_$release, $release} @tab $size KiB
+@item @ref{Release $release, $release} @tab $size KiB
 @tab @url{download/govpn-${release}.tar.xz, link} @url{download/govpn-${release}.tar.xz.sig, sign}
 @tab @code{$hash}
 EOF