summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1998-03-03 19:06:12 +0000
committerNiels Provos <provos@cvs.openbsd.org>1998-03-03 19:06:12 +0000
commitd747da3428a482974b811b4f9bfac0eecb09857b (patch)
treecfd683c20e17237db7923e29670580b4affe002d /sbin
parent40d1107f933f82d9cc87f6fc0242c7a99371f0c5 (diff)
make ping work for large packet sizes. closing pr# 417.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping/ping.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 191d324970a..9bb5ec156c0 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.26 1998/02/05 04:56:47 millert Exp $ */
+/* $OpenBSD: ping.c,v 1.27 1998/03/03 19:06:11 provos Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: ping.c,v 1.26 1998/02/05 04:56:47 millert Exp $";
+static char rcsid[] = "$OpenBSD: ping.c,v 1.27 1998/03/03 19:06:11 provos Exp $";
#endif
#endif /* not lint */
@@ -438,9 +438,7 @@ main(argc, argv)
* ethernet, or just want to fill the arp cache to get some stuff for
* /etc/ethers.
*/
- hold = 48 * 1024;
- (void)setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&hold,
- sizeof(hold));
+ (void)setsockopt(s, SOL_SOCKET, SO_RCVBUF, &packlen, sizeof(packlen));
if (to->sin_family == AF_INET)
(void)printf("PING %s (%s): %d data bytes\n", hostname,
@@ -619,7 +617,7 @@ pr_pack(buf, cc, from)
{
register struct icmp *icp;
register in_addr_t l;
- register int i, j;
+ register u_int i, j;
register u_char *cp,*dp;
static int old_rrlen;
static char old_rr[MAX_IPOPTLEN];