diff options
Diffstat (limited to 'usr.sbin/ipsend/ipresend/resend.c')
-rw-r--r-- | usr.sbin/ipsend/ipresend/resend.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/ipsend/ipresend/resend.c b/usr.sbin/ipsend/ipresend/resend.c index 4beec1ac887..7890062250d 100644 --- a/usr.sbin/ipsend/ipresend/resend.c +++ b/usr.sbin/ipsend/ipresend/resend.c @@ -1,6 +1,7 @@ -/* $OpenBSD: resend.c,v 1.3 1998/01/26 04:16:59 dgregor Exp $ */ +/* $OpenBSD: resend.c,v 1.4 2001/01/17 06:01:26 fgsch Exp $ */ + /* - * resend.c (C) 1995-1997 Darren Reed + * resend.c (C) 1995-1998 Darren Reed * * This was written to test what size TCP fragments would get through * various TCP/IP packet filters, as used in IP firewalls. In certain @@ -13,7 +14,7 @@ */ #if !defined(lint) static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: resend.c,v 1.3 1998/01/26 04:16:59 dgregor Exp $"; +static const char rcsid[] = "@(#)$IPFilter: resend.c,v 2.1 1999/08/04 17:31:12 darrenr Exp $"; #endif #include <stdio.h> #include <netdb.h> @@ -42,7 +43,7 @@ static const char rcsid[] = "@(#)$Id: resend.c,v 1.3 1998/01/26 04:16:59 dgregor extern int opts; -static u_char buf[65536]; /* 1 big packet */ +static u_char pbuf[65536]; /* 1 big packet */ void printpacket __P((ip_t *)); @@ -96,7 +97,7 @@ char *datain; if (fd < 0) exit(-1); - ip = (struct ip *)buf; + ip = (struct ip *)pbuf; eh = (ether_header_t *)malloc(sizeof(*eh)); bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); @@ -106,7 +107,7 @@ char *datain; return -2; } - while ((i = (*r->r_readip)(buf, sizeof(buf), NULL, NULL)) > 0) + while ((i = (*r->r_readip)((char *)pbuf, sizeof(pbuf), NULL, NULL)) > 0) { if (!(opts & OPT_RAW)) { len = ntohs(ip->ip_len); @@ -128,7 +129,7 @@ char *datain; len += sizeof(*eh); printpacket(ip); } else { - eh = (ether_header_t *)buf; + eh = (ether_header_t *)pbuf; len = i; } |