mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 19:39:57 +00:00
TUN-6716: Document limitation of Windows ICMP proxy
This commit is contained in:
@@ -262,6 +262,9 @@ func (ip *icmpProxy) Serve(ctx context.Context) error {
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
// Request sends an ICMP echo request and wait for a reply or timeout.
|
||||
// The async version of Win32 APIs take a callback whose memory is not garbage collected, so we use the synchronous version.
|
||||
// It's possible that a slow request will block other requests, so we set the timeout to only 1s.
|
||||
func (ip *icmpProxy) Request(pk *packet.ICMP, responder packet.FunnelUniPipe) error {
|
||||
if pk == nil {
|
||||
return errPacketNil
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
type ICMPRouter interface {
|
||||
// Serve starts listening for responses to the requests until context is done
|
||||
Serve(ctx context.Context) error
|
||||
// Request sends an ICMP message
|
||||
// Request sends an ICMP message. Implementations should not modify pk after the function returns.
|
||||
Request(pk *ICMP, responder FunnelUniPipe) error
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user