From owner-svn-src-projects@freebsd.org Sat Sep 16 16:26:48 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06445E202E7 for ; Sat, 16 Sep 2017 16:26:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C809A7F970; Sat, 16 Sep 2017 16:26:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8GGQkfW047254; Sat, 16 Sep 2017 16:26:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8GGQkkh047253; Sat, 16 Sep 2017 16:26:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709161626.v8GGQkkh047253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 16 Sep 2017 16:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r323647 - projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core X-SVN-Group: projects X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 323647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Sep 2017 16:26:48 -0000 Author: hselasky Date: Sat Sep 16 16:26:46 2017 New Revision: 323647 URL: https://svnweb.freebsd.org/changeset/base/323647 Log: Make sure the socket address length field gets set. Sponsored by: Mellanox Technologies Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_cma.c Sat Sep 16 16:24:38 2017 (r323646) +++ projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_cma.c Sat Sep 16 16:26:46 2017 (r323647) @@ -1094,6 +1094,7 @@ static void cma_save_ip4_info(struct sockaddr_in *src_ { if (src_addr) { *src_addr = (struct sockaddr_in) { + .sin_len = sizeof(struct sockaddr_in), .sin_family = AF_INET, .sin_addr.s_addr = hdr->dst_addr.ip4.addr, .sin_port = local_port, @@ -1102,6 +1103,7 @@ static void cma_save_ip4_info(struct sockaddr_in *src_ if (dst_addr) { *dst_addr = (struct sockaddr_in) { + .sin_len = sizeof(struct sockaddr_in), .sin_family = AF_INET, .sin_addr.s_addr = hdr->src_addr.ip4.addr, .sin_port = hdr->port, @@ -1124,6 +1126,7 @@ static void cma_save_ip6_info(struct sockaddr_in6 *src if (dst_addr) { *dst_addr = (struct sockaddr_in6) { + .sin6_len = sizeof(struct sockaddr_in6), .sin6_family = AF_INET6, .sin6_addr = hdr->src_addr.ip6, .sin6_port = hdr->port,