Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2017 15:49:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r325945 - stable/10/sys/ofed/drivers/infiniband/core
Message-ID:  <201711171549.vAHFn1qY083434@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Nov 17 15:49:01 2017
New Revision: 325945
URL: https://svnweb.freebsd.org/changeset/base/325945

Log:
  MFC r325616:
  Make sure sin_zero is zero in ibcore. Else socket address maching using
  bcmp() might fail.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/10/sys/ofed/drivers/infiniband/core/cma.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/cma.c	Fri Nov 17 15:48:03 2017	(r325944)
+++ stable/10/sys/ofed/drivers/infiniband/core/cma.c	Fri Nov 17 15:49:01 2017	(r325945)
@@ -867,12 +867,14 @@ static void cma_save_net_info(struct rdma_addr *addr,
 		ip4->sin_addr.s_addr = dst->ip4.addr;
 		ip4->sin_port = listen4->sin_port;
 		ip4->sin_len = sizeof(struct sockaddr_in);
+		memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero));
 
 		ip4 = (struct sockaddr_in *) &addr->dst_addr;
 		ip4->sin_family = listen4->sin_family;
 		ip4->sin_addr.s_addr = src->ip4.addr;
 		ip4->sin_port = port;
 		ip4->sin_len = sizeof(struct sockaddr_in);
+		memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero));
 		break;
 	case 6:
 		listen6 = (struct sockaddr_in6 *) &listen_addr->src_addr;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711171549.vAHFn1qY083434>