svn commit: r351090 - head/sbin/ping6

Alan Somers asomers at FreeBSD.org
Thu Aug 15 17:24:11 UTC 2019


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 at 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;


More information about the svn-src-all mailing list