Skip to content

Commit

Permalink
Support benchmarking servers with IPv6 addresses (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn-higgins1 authored Apr 7, 2022
1 parent 9fa65ae commit d0c6c55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ int server_addr::resolve(void)
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_PASSIVE;
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_INET; // Don't play with IPv6 for now...
hints.ai_family = PF_UNSPEC;

snprintf(port_str, sizeof(port_str)-1, "%u", m_port);
m_last_error = getaddrinfo(m_hostname.c_str(), port_str, &hints, &m_server_addr);
Expand Down
2 changes: 1 addition & 1 deletion config_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct connect_info {
int ci_protocol;
socklen_t ci_addrlen;
struct sockaddr *ci_addr;
char addr_buf[sizeof(struct sockaddr_in)];
char addr_buf[sizeof(struct sockaddr_storage)];
};

struct server_addr {
Expand Down

0 comments on commit d0c6c55

Please sign in to comment.