git: 369e3367d66c - releng/12.4 - ofed: allow using IPv6 address in rc_pingpong server

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 04 Nov 2022 15:57:34 UTC
The branch releng/12.4 has been updated by pkubaj (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=369e3367d66cd6ba3a96d7ab1d02e37099b2bf28

commit 369e3367d66cd6ba3a96d7ab1d02e37099b2bf28
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-10-28 09:59:05 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-11-04 15:57:11 +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
    Approved by:    re (gjb)
    
    (cherry picked from commit 35c87c070a2d04f06c56578b0a4b2e9c13f62be5)
    (cherry picked from commit a8c06a9de066902599e93b857ecf4d70c007e3c9)
    (cherry picked from commit a43afddd4325cf725c5b0897bfa43e31ac684f29)
---
 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 d01bdb80092a..1e2601612742 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 1b40aa6076c0..676572b559c4 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 fb030dc535b8..6225d6cda70c 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 419925ab1d40..266b5964a41b 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 b3c7f703441f..83abaf7780d8 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
 	};