diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-27 17:33:06 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-27 17:33:06 +0200 |
commit | 8236f3afa2eca0aae6c5da9560301c04d882c81b (patch) | |
tree | 5babaff66d6709f7f1fcdba69847ac684d1ef3de /src/send.go | |
parent | eb75ff430d1f78e129bbfe49d612f241ca418df4 (diff) |
Implemented MAC1/2 calculation
Diffstat (limited to 'src/send.go')
-rw-r--r-- | src/send.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/send.go b/src/send.go index da5905d..f58d311 100644 --- a/src/send.go +++ b/src/send.go @@ -24,6 +24,10 @@ type OutboundWorkQueueElement struct { keyPair *KeyPair } +func (peer *Peer) HandshakeWorker(handshakeQueue []byte) { + +} + func (device *Device) SendPacket(packet []byte) { // lookup peer @@ -39,7 +43,7 @@ func (device *Device) SendPacket(packet []byte) { peer = device.routingTable.LookupIPv6(dst) default: - device.logger.Println("unknown IP version") + device.log.Debug.Println("receieved packet with unknown IP version") return } @@ -146,15 +150,13 @@ func (peer *Peer) RoutineOutboundNonceWorker() { func (peer *Peer) RoutineSequential() { for work := range peer.queueOutbound { work.wg.Wait() - - // check if dropped ("ghost packet") - if work.packet == nil { continue } - - // - + if peer.endpoint == nil { + continue + } + peer.device.conn.WriteToUDP(work.packet, peer.endpoint) } } |