mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-07 01:22:54 +08:00
Fixed transport header problem
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user