| 100 | } |
| 101 | |
| 102 | bool IsFQDN(const TString& name) { |
| 103 | TString absName = name; |
| 104 | if (!absName.EndsWith('.')) { |
| 105 | absName.append("."); |
| 106 | } |
| 107 | |
| 108 | try { |
| 109 | // ResolveHost() can't be used since it is ipv4-only, port is not important |
| 110 | TNetworkAddress addr(absName, 0); |
| 111 | } catch (const TNetworkResolutionError&) { |
| 112 | return false; |
| 113 | } |
| 114 | return true; |
| 115 | } |
no test coverage detected