Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2019 17:24:10 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351090 - head/sbin/ping6
Message-ID:  <201908151724.x7FHOAee040924@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Thu Aug 15 17:24:10 2019
New Revision: 351090
URL: https://svnweb.freebsd.org/changeset/base/351090

Log:
  ping6: Fix data type of the buffer for ancillary data of a received message
  
  The old code worked, but wasted some stack space.
  
  Submitted by:	Ján Sučan <sucanjan@gmail.com>
  MFC after:	2 weeks
  Sponsored by:	Google, inc. (Google Summer of Code 2019)
  Differential Revision:	https://reviews.freebsd.org/D21275

Modified:
  head/sbin/ping6/ping6.c

Modified: head/sbin/ping6/ping6.c
==============================================================================
--- head/sbin/ping6/ping6.c	Thu Aug 15 17:21:38 2019	(r351089)
+++ head/sbin/ping6/ping6.c	Thu Aug 15 17:24:10 2019	(r351090)
@@ -307,7 +307,7 @@ main(int argc, char *argv[])
 	int ip6optlen = 0;
 	struct cmsghdr *scmsgp = NULL;
 	/* For control (ancillary) data received from recvmsg() */
-	struct cmsghdr cm[CONTROLLEN];
+	u_char cm[CONTROLLEN];
 #if defined(SO_SNDBUF) && defined(SO_RCVBUF)
 	u_long lsockbufsize;
 	int sockbufsize = 0;



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