Fixed transport header problem
This commit is contained in:
parent
1e620427bd
commit
2aa0daf4d5
5 changed files with 32 additions and 20 deletions
|
|
@ -75,6 +75,7 @@ func (device *Device) RoutineReceiveIncomming() {
|
|||
// handle packet
|
||||
|
||||
packet = packet[:size]
|
||||
debugLog.Println("GOT:", packet)
|
||||
msgType := binary.LittleEndian.Uint32(packet[:4])
|
||||
|
||||
func() {
|
||||
|
|
@ -371,6 +372,8 @@ func (peer *Peer) RoutineSequentialReceiver() {
|
|||
|
||||
// check for replay
|
||||
|
||||
// strip padding
|
||||
|
||||
// check for keep-alive
|
||||
|
||||
if len(elem.packet) == 0 {
|
||||
|
|
@ -393,8 +396,6 @@ func (device *Device) RoutineWriteToTUN(tun TUNDevice) {
|
|||
case packet = <-device.queue.inbound:
|
||||
}
|
||||
|
||||
device.log.Debug.Println("GOT:", packet)
|
||||
|
||||
size, err := tun.Write(packet)
|
||||
device.log.Debug.Println("DEBUG:", size, err)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue