Add ENETUNREACH to non-retryable errors in XorTransport by wh1t3f1r3 · Pull Request #1668 · python-kasa/python-kasa
ENETUNREACH (errno 101, Network unreachable) is semantically equivalent to EHOSTUNREACH, which is already in _NO_RETRY_ERRORS. Both indicate the destination cannot be reached at the network layer and retrying immediately will not resolve the condition. In containerized environments (e.g., Home Assistant in Docker with bridge networking), ICMP Network unreachable responses can temporarily poison the routing cache. The unnecessary retries reinforce the poisoned cache entry, causing cascading failures for other devices on the same subnet.