tailscale/tailscale · error

sendto error: %v

Error message

sendto error: %v

What it means

Error "sendto error: %v" thrown in tailscale/tailscale.

Source

Thrown at cmd/stunstamp/stunstamp_linux.go:106

	}
	var to unix.Sockaddr
	if dst.Addr().Is4() {
		txMsg.Type = ipv4.ICMPTypeEcho
		to = &unix.SockaddrInet4{}
		copy(to.(*unix.SockaddrInet4).Addr[:], dst.Addr().AsSlice())
	} else {
		txMsg.Type = ipv6.ICMPTypeEchoRequest
		to = &unix.SockaddrInet6{}
		copy(to.(*unix.SockaddrInet6).Addr[:], dst.Addr().AsSlice())
	}
	txBuf, err := txMsg.Marshal(nil)
	if err != nil {
		return 0, err
	}
	txAt := time.Now()
	err = sconn.Sendto(context.Background(), txBuf, 0, to)
	if err != nil {
		return 0, fmt.Errorf("sendto error: %v", err)
	}

	if source == timestampSourceKernel {
		txCtx, txCancel := context.WithTimeout(context.Background(), txRxTimeout)
		defer txCancel()

		buf := make([]byte, 1024)
		oob := make([]byte, 1024)

		for {
			n, oobn, _, _, err := sconn.Recvmsg(txCtx, buf, oob, unix.MSG_ERRQUEUE)
			if err != nil {
				return 0, fmt.Errorf("recvmsg (MSG_ERRQUEUE) error: %v", err) // don't wrap
			}

			buf = buf[:n]
			// Spin until we find the message we sent. We get the full packet
			// looped including eth header so match against the tail.

View on GitHub (pinned to cfe32b8be6)

When it happens

Trigger: Thrown at cmd/stunstamp/stunstamp_linux.go:106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@cfe32b8be6 (2026-08-15). Data as JSON: /api/errors/6e41ce7a79750411. Report an issue: GitHub.