git: 35c87c070a2d - main - ofed: allow using IPv6 address in rc_pingpong server

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 30 Oct 2022 19:12:45 UTC
The branch main has been updated by pkubaj (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=35c87c070a2d04f06c56578b0a4b2e9c13f62be5

commit 35c87c070a2d04f06c56578b0a4b2e9c13f62be5
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-10-28 09:59:05 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-10-30 19:11:41 +0000

    ofed: allow using IPv6 address in rc_pingpong server
    
    Summary:
    The current OFED code allows binding server to IPv6 address. It was added back in https://github.com/linux-rdma/rdma-core/commit/91fc39561d04903cd5b1665d9215a184baa66ba9
    
    Sponsored by:   Intel Corporation
    MFC after:      3 days
    
    Reviewers: hselasky
    
    Subscribers: imp
    
    Differential Revision: https://reviews.freebsd.org/D37196
---
 contrib/ofed/libibverbs/examples/rc_pingpong.c   | 2 +-
 contrib/ofed/libibverbs/examples/srq_pingpong.c  | 2 +-
 contrib/ofed/libibverbs/examples/uc_pingpong.c   | 2 +-
 contrib/ofed/libibverbs/examples/ud_pingpong.c   | 2 +-
 contrib/ofed/libibverbs/examples/xsrq_pingpong.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/ofed/libibverbs/examples/rc_pingpong.c b/contrib/ofed/libibverbs/examples/rc_pingpong.c
index 12e427d6bd5e..2c86be2550e9 100644
--- a/contrib/ofed/libibverbs/examples/rc_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/rc_pingpong.c
@@ -230,7 +230,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 	struct addrinfo *res, *t;
 	struct addrinfo hints = {
 		.ai_flags    = AI_PASSIVE,
-		.ai_family   = AF_INET,
+		.ai_family   = AF_UNSPEC,
 		.ai_socktype = SOCK_STREAM
 	};
 	char *service;
diff --git a/contrib/ofed/libibverbs/examples/srq_pingpong.c b/contrib/ofed/libibverbs/examples/srq_pingpong.c
index 703ebd6077c5..36373cebe8f5 100644
--- a/contrib/ofed/libibverbs/examples/srq_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/srq_pingpong.c
@@ -238,7 +238,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 	struct addrinfo *res, *t;
 	struct addrinfo hints = {
 		.ai_flags    = AI_PASSIVE,
-		.ai_family   = AF_INET,
+		.ai_family   = AF_UNSPEC,
 		.ai_socktype = SOCK_STREAM
 	};
 	char *service;
diff --git a/contrib/ofed/libibverbs/examples/uc_pingpong.c b/contrib/ofed/libibverbs/examples/uc_pingpong.c
index 5eed25a2c25f..0f362a424fe1 100644
--- a/contrib/ofed/libibverbs/examples/uc_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/uc_pingpong.c
@@ -204,7 +204,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 	struct addrinfo *res, *t;
 	struct addrinfo hints = {
 		.ai_flags    = AI_PASSIVE,
-		.ai_family   = AF_INET,
+		.ai_family   = AF_UNSPEC,
 		.ai_socktype = SOCK_STREAM
 	};
 	char *service;
diff --git a/contrib/ofed/libibverbs/examples/ud_pingpong.c b/contrib/ofed/libibverbs/examples/ud_pingpong.c
index 0dec9a34980c..07d14ccef718 100644
--- a/contrib/ofed/libibverbs/examples/ud_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/ud_pingpong.c
@@ -202,7 +202,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 	struct addrinfo *res, *t;
 	struct addrinfo hints = {
 		.ai_flags    = AI_PASSIVE,
-		.ai_family   = AF_INET,
+		.ai_family   = AF_UNSPEC,
 		.ai_socktype = SOCK_STREAM
 	};
 	char *service;
diff --git a/contrib/ofed/libibverbs/examples/xsrq_pingpong.c b/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
index 4247f84ad1b5..c8b8a8ebf34c 100644
--- a/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
@@ -596,7 +596,7 @@ static int pp_server_connect(int port)
 	int sockfd = -1, connfd;
 	struct addrinfo hints = {
 		.ai_flags    = AI_PASSIVE,
-		.ai_family   = AF_INET,
+		.ai_family   = AF_UNSPEC,
 		.ai_socktype = SOCK_STREAM
 	};