From 12244b606beabe9f10f185733f08cbe60b42ef90 Mon Sep 17 00:00:00 2001 From: Mark Haywood Date: Fri, 26 Apr 2019 17:56:19 +0200 Subject: [PATCH] ibacm: fix double hint.ai_family assignment in ib_acm_connect_open() [ Upstream commit 08843dc99669ae50c5ba204db644d5423fe8e910 ] It appears that a previous fix accidentally introduced a double assignment to hint.ai_family and, in the process, accidentally removed the assignment to hint.ai_protocol. This patch will fix both assignments. Fixes: 579b6bf8 ("ibacm: Adding new configuration option 'server_mode'") Signed-off-by: Mark Haywood Signed-off-by: Nicolas Morey-Chaisemartin --- ibacm/src/libacm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibacm/src/libacm.c b/ibacm/src/libacm.c index 2bb2ac478..e50fbf433 100644 --- a/ibacm/src/libacm.c +++ b/ibacm/src/libacm.c @@ -64,8 +64,8 @@ static int ib_acm_connect_open(char *dest) acm_set_server_port(); memset(&hint, 0, sizeof hint); - hint.ai_family = AF_INET; hint.ai_family = AF_UNSPEC; + hint.ai_protocol = IPPROTO_TCP; ret = getaddrinfo(dest, NULL, &hint, &res); if (ret)