Module Name:    src
Committed By:   martin
Date:           Wed Jan  5 14:43:40 UTC 2011

Modified Files:
        src/tests/net/icmp: t_ping.c

Log Message:
Use raw buffer size (not aligned value) to limit packet size


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/net/icmp/t_ping.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/net/icmp/t_ping.c
diff -u src/tests/net/icmp/t_ping.c:1.12 src/tests/net/icmp/t_ping.c:1.13
--- src/tests/net/icmp/t_ping.c:1.12	Wed Jan  5 14:08:12 2011
+++ src/tests/net/icmp/t_ping.c	Wed Jan  5 14:43:40 2011
@@ -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)));

Reply via email to