Make sure the output packet buffer and the control message buffer
are aligned. Fixes bin/56198.
This commit is contained in:
parent
666ac125e0
commit
f3e7a08f5b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ping6.c,v 1.103 2018/04/24 07:22:32 maxv Exp $ */
|
||||
/* $NetBSD: ping6.c,v 1.104 2021/05/23 07:17:50 thorpej Exp $ */
|
||||
/* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -77,7 +77,7 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
|
|||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: ping6.c,v 1.103 2018/04/24 07:22:32 maxv Exp $");
|
||||
__RCSID("$NetBSD: ping6.c,v 1.104 2021/05/23 07:17:50 thorpej Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -201,7 +201,7 @@ static struct sockaddr_in6 src; /* src addr of this packet */
|
|||
static socklen_t srclen;
|
||||
static int datalen = DEFDATALEN;
|
||||
static int s; /* socket file descriptor */
|
||||
static u_char outpack[MAXPACKETLEN];
|
||||
static u_char outpack[MAXPACKETLEN] __aligned(sizeof(u_long));
|
||||
static char BSPACE = '\b'; /* characters written for flood */
|
||||
static char DOT = '.';
|
||||
static char *hostname;
|
||||
|
@ -923,7 +923,7 @@ doit(u_char *packet, u_int packlen)
|
|||
|
||||
for (;;) {
|
||||
struct msghdr m;
|
||||
u_char buf[1024];
|
||||
u_long buf[1024 / sizeof(u_long)];
|
||||
struct iovec iov[2];
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
|
Loading…
Reference in New Issue