Fix packet handling in Transport to clarify link data processing
Some checks failed
Go Test Multi-Platform / Test (macos-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (windows-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (macos-latest, arm64) (push) Has been cancelled
Go Build Multi-Platform / build (amd64, linux) (push) Failing after 22s
Go Build Multi-Platform / build (amd64, darwin) (push) Failing after 30s
Go Build Multi-Platform / build (amd64, freebsd) (push) Failing after 29s
Go Build Multi-Platform / build (amd64, windows) (push) Failing after 27s
Go Build Multi-Platform / build (arm, freebsd) (push) Failing after 33s
Go Build Multi-Platform / build (arm, linux) (push) Failing after 33s
Go Build Multi-Platform / build (arm64, windows) (push) Failing after 31s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Failing after 32s
Go Build Multi-Platform / Create Release (push) Has been skipped
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Failing after 37s
Go Revive Lint / lint (push) Successful in 34s
Run Gosec / tests (push) Failing after 41s
Go Build Multi-Platform / build (arm, windows) (push) Failing after 31s
Go Build Multi-Platform / build (arm64, darwin) (push) Failing after 30s
Go Build Multi-Platform / build (arm64, freebsd) (push) Failing after 31s
Go Build Multi-Platform / build (arm64, linux) (push) Failing after 32s
Some checks failed
Go Test Multi-Platform / Test (macos-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (windows-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (macos-latest, arm64) (push) Has been cancelled
Go Build Multi-Platform / build (amd64, linux) (push) Failing after 22s
Go Build Multi-Platform / build (amd64, darwin) (push) Failing after 30s
Go Build Multi-Platform / build (amd64, freebsd) (push) Failing after 29s
Go Build Multi-Platform / build (amd64, windows) (push) Failing after 27s
Go Build Multi-Platform / build (arm, freebsd) (push) Failing after 33s
Go Build Multi-Platform / build (arm, linux) (push) Failing after 33s
Go Build Multi-Platform / build (arm64, windows) (push) Failing after 31s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Failing after 32s
Go Build Multi-Platform / Create Release (push) Has been skipped
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Failing after 37s
Go Revive Lint / lint (push) Successful in 34s
Run Gosec / tests (push) Failing after 41s
Go Build Multi-Platform / build (arm, windows) (push) Failing after 31s
Go Build Multi-Platform / build (arm64, darwin) (push) Failing after 30s
Go Build Multi-Platform / build (arm64, freebsd) (push) Failing after 31s
Go Build Multi-Platform / build (arm64, linux) (push) Failing after 32s
This commit is contained in:
@@ -841,9 +841,9 @@ func (t *Transport) HandlePacket(data []byte, iface common.NetworkInterface) {
|
||||
}
|
||||
t.handleProofPacket(pkt, iface)
|
||||
case 0x00:
|
||||
// Data packets with destType=2 are for established links
|
||||
if destType == 2 {
|
||||
debug.Log(debug.DEBUG_ERROR, "Processing link data packet (dest_type=2)", "packet_size", len(data))
|
||||
// Data packets addressed to link destinations carry link traffic
|
||||
if destType == DEST_TYPE_LINK {
|
||||
debug.Log(debug.DEBUG_ERROR, "Processing link data packet (dest_type=3)", "packet_size", len(data))
|
||||
t.handleLinkPacket(data[1:], iface, 0x00)
|
||||
} else {
|
||||
debug.Log(debug.DEBUG_ERROR, "Processing data packet (type 0x00)", "packet_size", len(data), "dest_type", destType, "header_type", headerType)
|
||||
@@ -1135,7 +1135,7 @@ func (t *Transport) handleLinkPacket(data []byte, iface common.NetworkInterface,
|
||||
return
|
||||
}
|
||||
|
||||
// Otherwise, this is a data packet for an established link (destType=2, packetType=0x00)
|
||||
// Otherwise, this is a data packet for an established link
|
||||
debug.Log(debug.DEBUG_ERROR, "Processing link data packet")
|
||||
|
||||
// Parse as data packet - prepend packet type 0x00
|
||||
|
||||
Reference in New Issue
Block a user