Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2017 16:26:46 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r323647 - projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core
Message-ID:  <201709161626.v8GGQkkh047253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



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