]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/peer.go
Make SliceZero function public
[govpn.git] / src / govpn / peer.go
index 1097eacf030975378344b30557bdc7d4ae4915c8..586444438c6eec127cba39333a2210b8ece91b9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
 
 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
@@ -127,11 +127,11 @@ func (p *Peer) String() string {
 func (p *Peer) Zero() {
        p.BusyT.Lock()
        p.BusyR.Lock()
-       sliceZero(p.Key[:])
-       sliceZero(p.bufR)
-       sliceZero(p.bufT)
-       sliceZero(p.keyAuthR[:])
-       sliceZero(p.keyAuthT[:])
+       SliceZero(p.Key[:])
+       SliceZero(p.bufR)
+       SliceZero(p.bufT)
+       SliceZero(p.keyAuthR[:])
+       SliceZero(p.keyAuthT[:])
        p.BusyT.Unlock()
        p.BusyR.Unlock()
 }
@@ -330,7 +330,7 @@ func (p *Peer) PktProcess(data []byte, tap io.Writer, reorderable bool) bool {
                p.BusyR.Unlock()
                return true
        }
-       if int(p.pktSizeR) > len(data) - MinPktLength {
+       if int(p.pktSizeR) > len(data)-MinPktLength {
                return false
        }
        p.BytesPayloadIn += int64(p.pktSizeR)