You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plumb ICMP into magicsock and where appropriate pass to overlay network #9480
I observed a case where a remote endpoint was returning ICMP destination unreachable, but magicsock is unaware, and could become so.
This can be achieved for example on linux by setting IP_RECVERR and reading the error message queue in the receive path. There are additional behaviors to consider, but that are also advantageous in doing so, for example observing ENOBUF when expending the send capacity of the system, a condition which we would do well to at least monitor if not apply backpressure.
Example issues that can be addressed:
Cause immediate rather than hours later TCP socket teardown when a peer goes away
Cause immediate notification on UDP transports when a peer goes away
Pass packet too big from outer to inner layer to make pmtud work where available on host systems
Manifest ICMP for too big packets arriving at TUN from the host system
changed the title [-]plumb ICMP host destination unreachable back to endpoint selection in magicsock[/-][+]plumb ICMP into magicsock and where appropriate pass to overlay network[/+]on Jan 8, 2025
Activity
raggi commentedon Sep 20, 2023
cc @valscale
jwhited commentedon Jan 22, 2024
magicsock is already pretty sensitive to changes in UDP best path reachability via its heartbeating mechanism: https://github.com/tailscale/tailscale/blob/v1.58.0/wgengine/magicsock/magicsock.go#L2757-L2759. Therefore, we are not considering this/packet too big handling a blocker of PTMU-related work. We do need to ensure heartbeats are sized to the the path MTU that's in use to make that same sensitivity apply for non-default path MTU. cc @clairew @sailorfrag
[-]plumb ICMP host destination unreachable back to endpoint selection in magicsock[/-][+]plumb ICMP into magicsock and where appropriate pass to overlay network[/+]