cloudflare/cloudflared · error
failed to send/receive ICMPv6 echo
Error message
failed to send/receive ICMPv6 echo
What it means
On Windows, icmpEchoRoundtrip dispatches to the ICMPv6 Windows API (Icmp6SendEcho) when the proxy was created for IPv6, wrapping any failure from icmp6SendEcho with 'failed to send/receive ICMPv6 echo'. This covers Win32 API failures — invalid handles, bad parameters, or no reply received — during the ICMPv6 echo roundtrip.
Source
Thrown at ingress/icmp_windows.go:339
Body: &icmp.Echo{
ID: echoReq.ID,
Seq: echoReq.Seq,
Data: resp.payload(),
},
},
}
return responder.ReturnPacket(&pk)
}
func (ip *icmpProxy) icmpEchoRoundtrip(dst netip.Addr, echo *icmp.Echo) (echoResp, error) {
if dst.Is6() {
if ip.srcSocketAddr == nil {
return nil, fmt.Errorf("cannot send ICMPv6 using ICMPv4 proxy")
}
resp, err := ip.icmp6SendEcho(dst, echo)
if err != nil {
return nil, errors.Wrap(err, "failed to send/receive ICMPv6 echo")
}
return resp, nil
}
if ip.srcSocketAddr != nil {
return nil, fmt.Errorf("cannot send ICMPv4 using ICMPv6 proxy")
}
resp, err := ip.icmpSendEcho(dst, echo)
if err != nil {
return nil, errors.Wrap(err, "failed to send/receive ICMPv4 echo")
}
return resp, nil
}
/*
Wrapper to call https://docs.microsoft.com/en-us/windows/win32/api/icmpapi/nf-icmpapi-icmpsendecho
Parameters:
- IcmpHandle: Handle created by IcmpCreateFile
- DestinationAddress: IPv4 in the form of https://docs.microsoft.com/en-us/windows/win32/api/inaddr/ns-inaddr-in_addr#syntaxView on GitHub (pinned to 2253eeeb25)
Solutions
- Verify IPv6 connectivity to the destination (test with the OS `ping -6`).
- Allow ICMPv6 echo in Windows Firewall (File and Printer Sharing / ICMPv6 rules).
- Confirm the source address assigned to the proxy still exists on a network interface.
- Retry; transient loss still surfaces through this wrapper — check the inner status for details.
Defensive patterns
Strategy: retry
Validate before calling
// Before probing, verify IPv6 connectivity
addrs, err := net.InterfaceAddrs()
hasV6 := false
for _, a := range addrs {
if ip := a.(*net.IPNet).IP; ip.To16() != nil && ip.To4() == nil && ip.IsGlobalUnicast() {
hasV6 = true
}
}
if !hasV6 {
// skip ICMPv6 probe; no IPv6 connectivity
} Try / catch
// Go: wrap the probe with a bounded retry
var resp *echoResp
var err error
for i := 0; i < 3; i++ {
resp, err = proxy.Request(ctx, dst, echo)
if err == nil || !strings.Contains(err.Error(), "failed to send/receive ICMPv6 echo") {
break
}
select {
case <-ctx.Done():
return ctx.Err()
case <-time.After(time.Second):
}
} Prevention
- Check OS-level `ping -6` works before relying on ICMPv6 probes.
- Allow ICMPv6 in Windows Firewall profiles.
- Handle probe failures gracefully in health-check logic instead of failing fast.
When it happens
Trigger: Request() on an ICMPv6 proxy where Icmp6SendEcho returns 0: the destination is unreachable, the ICMPv6 socket could not bind to the source address, firewall blocks ICMPv6, or the echo request parameters (dst/echo) are malformed for the IPv6 API.
Common situations: Pinging an IPv6 host from a Windows machine with no IPv6 connectivity, Windows Firewall blocking outbound ICMPv6, or the source address (srcSocketAddr) no longer being valid on the interface.
Related errors
- failed to send/receive ICMPv4 echo
- received ip status: %s
- did not receive ICMP echo reply
- funnel not found
- expect IPv4, but %s is IPv6
AI-assisted analysis of cloudflare/cloudflared@2253eeeb25 (2026-09-06).
Data as JSON: /api/errors/51f7c7e1ae687b60.
Report an issue: GitHub.