From 8236f3afa2eca0aae6c5da9560301c04d882c81b Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Tue, 27 Jun 2017 17:33:06 +0200 Subject: Implemented MAC1/2 calculation --- src/send.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/send.go') 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) } } -- cgit v1.2.3