We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear clickhouse-cpp team,
The following function in clickhouse-cpp/clickhouse/columns/ip4.cpp is always thrown an exception, when ipv4 address is 255.255.255.255:
void ColumnIPv4::Append(const std::string& str) { in_addr_t addr = inet_addr(str.c_str()); if (addr == INADDR_NONE) { throw std::runtime_error("invalid IPv4 format, ip: " + str); } data_->Append(htonl(addr)); }
Because inet_addr function is obsolete, and this is a known issue. https://www.gnu.org/software/libc/manual/html_node/Host-Address-Functions.html
The possible solution is the following:
void ColumnIPv4::Append(const std::string& str) { struct in_addr addr; if (inet_aton(str.c_str(),&addr) == 0) { throw std::runtime_error("invalid IPv4 format, ip: " + str); } data_->Append(htonl(addr.s_addr)); }
Please solve this problem.
Thank you and best regards, BB
The text was updated successfully, but these errors were encountered:
Can you send a PR with that change? (this way you will be an author of that :) )
Sorry, something went wrong.
Closed by #148
No branches or pull requests
Dear clickhouse-cpp team,
The following function in clickhouse-cpp/clickhouse/columns/ip4.cpp is always thrown an exception, when ipv4 address is 255.255.255.255:
Because inet_addr function is obsolete, and this is a known issue. https://www.gnu.org/software/libc/manual/html_node/Host-Address-Functions.html
The possible solution is the following:
Please solve this problem.
Thank you and best regards,
BB
The text was updated successfully, but these errors were encountered: