Use unspecified address family when connecting as a client in

libibverbs example utilities.

This allows connecting to both IPv4 and IPv6 and reverts
some FreeBSD only patches.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-07-18 10:23:30 +00:00
parent 7600168453
commit 3468ddce67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336453
5 changed files with 5 additions and 5 deletions

View File

@ -154,7 +154,7 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por
{
struct addrinfo *res, *t;
struct addrinfo hints = {
.ai_family = AF_INET,
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM
};
char *service;

View File

@ -147,7 +147,7 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por
{
struct addrinfo *res, *t;
struct addrinfo hints = {
.ai_family = AF_INET,
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM
};
char *service;

View File

@ -127,7 +127,7 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por
{
struct addrinfo *res, *t;
struct addrinfo hints = {
.ai_family = AF_INET,
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM
};
char *service;

View File

@ -127,7 +127,7 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por
{
struct addrinfo *res, *t;
struct addrinfo hints = {
.ai_family = AF_INET,
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM
};
char *service;

View File

@ -544,7 +544,7 @@ static int pp_client_connect(const char *servername, int port)
int ret;
int sockfd = -1;
struct addrinfo hints = {
.ai_family = AF_INET,
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM
};