Fix gvisor icmp write
This commit is contained in:
parent
a256dca36b
commit
12c9fb6a5d
1 changed files with 2 additions and 1 deletions
|
|
@ -225,7 +225,8 @@ func (w *ICMPBackWriter) WritePacket(p []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func icmpWritePacketBuffer(action DirectRouteDestination, packetBuffer *stack.PacketBuffer) error {
|
func icmpWritePacketBuffer(action DirectRouteDestination, packetBuffer *stack.PacketBuffer) error {
|
||||||
packetSlice := packetBuffer.TransportHeader().Slice()
|
packetSlice := packetBuffer.NetworkHeader().Slice()
|
||||||
|
packetSlice = append(packetSlice, packetBuffer.TransportHeader().Slice()...)
|
||||||
packetSlice = append(packetSlice, packetBuffer.Data().AsRange().ToSlice()...)
|
packetSlice = append(packetSlice, packetBuffer.Data().AsRange().ToSlice()...)
|
||||||
return action.WritePacket(buf.As(packetSlice).ToOwned())
|
return action.WritePacket(buf.As(packetSlice).ToOwned())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue