diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-10-27 10:43:37 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-10-27 10:43:37 +0200 |
commit | 0485c34c8e20e4f7ea19bd3c3f52d2f4717caead (patch) | |
tree | 72c360fc84cb731bfa84fc627063debdf69ecd2c /src/send.go | |
parent | fd6f2e1f554cb545c7c554b56e2ac77308822680 (diff) |
Fixed message header length in conn_linux
Diffstat (limited to 'src/send.go')
-rw-r--r-- | src/send.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/send.go b/src/send.go index e37a736..52872f6 100644 --- a/src/send.go +++ b/src/send.go @@ -2,7 +2,6 @@ package main import ( "encoding/binary" - "errors" "golang.org/x/crypto/chacha20poly1305" "golang.org/x/net/ipv4" "golang.org/x/net/ipv6" @@ -105,17 +104,6 @@ func addToEncryptionQueue( } } -func (peer *Peer) SendBuffer(buffer []byte) error { - peer.device.net.mutex.RLock() - defer peer.device.net.mutex.RUnlock() - peer.mutex.RLock() - defer peer.mutex.RUnlock() - if !peer.endpoint.set { - return errors.New("No known endpoint for peer") - } - return peer.device.net.bind.Send(buffer, &peer.endpoint.value) -} - /* Reads packets from the TUN and inserts * into nonce queue for peer * |