Skip to content

Commit

Permalink
GetIp4 improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aligungr committed Jul 2, 2021
1 parent 10d09d5 commit f522251
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/utils/yaml_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ std::string GetIp4(const YAML::Node &node, const std::string &name)
auto ipFromIf = io::GetIp4OfInterface(s);
if (ipFromIf.empty())
FieldError(name, "must be a valid IPv4 address or a valid network interface with a IPv4 address");

auto n = io::GetHostByName(name);
if (utils::GetIpVersion(n) == 4)
return n;
return "";
return ipFromIf;
}

void AssertHasBool(const YAML::Node &node, const std::string &name)
Expand Down

0 comments on commit f522251

Please sign in to comment.