Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/icmp Use raw buffer size (not aligned value) to li...
details: https://anonhg.NetBSD.org/src/rev/c15e868d66c4
branches: trunk
changeset: 760454:c15e868d66c4
user: martin <martin%NetBSD.org@localhost>
date: Wed Jan 05 14:43:40 2011 +0000
description:
Use raw buffer size (not aligned value) to limit packet size
diffstat:
tests/net/icmp/t_ping.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 1b93075f6f8b -r c15e868d66c4 tests/net/icmp/t_ping.c
--- a/tests/net/icmp/t_ping.c Wed Jan 05 14:08:12 2011 +0000
+++ b/tests/net/icmp/t_ping.c Wed Jan 05 14:43:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ping.c,v 1.12 2011/01/05 14:08:12 martin Exp $ */
+/* $NetBSD: t_ping.c,v 1.13 2011/01/05 14:43:40 martin Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: t_ping.c,v 1.12 2011/01/05 14:08:12 martin Exp $");
+__RCSID("$NetBSD: t_ping.c,v 1.13 2011/01/05 14:43:40 martin Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -157,8 +157,8 @@
if (pktsize < sizeof(*icmp))
pktsize = sizeof(*icmp);
- if (pktsize > sizeof(sndbuf))
- pktsize = sizeof(sndbuf);
+ if (pktsize > sizeof(sndbuf.buf))
+ pktsize = sizeof(sndbuf.buf);
RL(rump_sys_setsockopt(s, SOL_SOCKET, SO_SNDBUF,
&pktsize, sizeof(pktsize)));
Home |
Main Index |
Thread Index |
Old Index