isSelfClient determines if the given address belongs to the client itself. Used to avoid self-ping operations in connectivity tests by checking hostname and IP address matches.
(client TailscaleClient, addr string)
| 708 | // Used to avoid self-ping operations in connectivity tests by checking |
| 709 | // hostname and IP address matches. |
| 710 | func isSelfClient(client TailscaleClient, addr string) bool { |
| 711 | if addr == client.Hostname() { |
| 712 | return true |
| 713 | } |
| 714 | |
| 715 | ips, err := client.IPs() |
| 716 | if err != nil { |
| 717 | return false |
| 718 | } |
| 719 | |
| 720 | for _, ip := range ips { |
| 721 | if ip.String() == addr { |
| 722 | return true |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | return false |
| 727 | } |
| 728 | |
| 729 | // assertClientsState validates the status and netmap of a list of clients for general connectivity. |
| 730 | // Runs parallel validation of status, netcheck, and netmap for all clients to ensure |
no test coverage detected