diff options
author | guido <guido@FreeBSD.org> | 2000-01-13 18:30:37 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 2000-01-13 18:30:37 +0000 |
commit | c3aa6ac872203077a6f4cd5b2ff64081364914b9 (patch) | |
tree | cfa01573562836d96f5ea84089201765075aa87c /contrib/ipfilter/ipsend | |
parent | 0539756f3d2277bd1ecc19afb014c074426e2f35 (diff) | |
download | FreeBSD-src-c3aa6ac872203077a6f4cd5b2ff64081364914b9.zip FreeBSD-src-c3aa6ac872203077a6f4cd5b2ff64081364914b9.tar.gz |
Import of ipfilter 3.3.6 (freebsd relevant part)
Obtained from: ftp://coombs.anu.edu.au/pub/net/firewall/ip-filter/ip_fil3.3.6.tar.gz
Diffstat (limited to 'contrib/ipfilter/ipsend')
-rw-r--r-- | contrib/ipfilter/ipsend/ipsend.c | 6 | ||||
-rw-r--r-- | contrib/ipfilter/ipsend/iptest.1 | 2 | ||||
-rw-r--r-- | contrib/ipfilter/ipsend/iptest.c | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/contrib/ipfilter/ipsend/ipsend.c b/contrib/ipfilter/ipsend/ipsend.c index 87c36d5..41d05ee 100644 --- a/contrib/ipfilter/ipsend/ipsend.c +++ b/contrib/ipfilter/ipsend/ipsend.c @@ -12,13 +12,14 @@ */ #if !defined(lint) static const char sccsid[] = "@(#)ipsend.c 1.5 12/10/95 (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: ipsend.c,v 2.1 1999/08/04 17:31:06 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: ipsend.c,v 2.1.2.2 1999/11/28 03:43:44 darrenr Exp $"; #endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <netdb.h> #include <string.h> +#include <sys/param.h> #include <sys/types.h> #include <sys/time.h> #include <sys/socket.h> @@ -176,7 +177,8 @@ char **argv; struct in_addr gwip; tcphdr_t *tcp; ip_t *ip; - char *name = argv[0], host[64], *gateway = NULL, *dev = NULL; + char *name = argv[0], host[MAXHOSTNAMELEN + 1]; + char *gateway = NULL, *dev = NULL; char *src = NULL, *dst, *s; int mtu = 1500, olen = 0, c, nonl = 0; diff --git a/contrib/ipfilter/ipsend/iptest.1 b/contrib/ipfilter/ipsend/iptest.1 index 02036b9..ca74094 100644 --- a/contrib/ipfilter/ipsend/iptest.1 +++ b/contrib/ipfilter/ipsend/iptest.1 @@ -37,7 +37,7 @@ variations). .TP .B \-2 Run IP test group #2. This group of tests generates packets with the IP -options constructed with invalud values given other packet characteristics. +options constructed with invalid values given other packet characteristics. The point tests are: 1 (option length > packet length), 2 (option length = 0). .TP .B \-3 diff --git a/contrib/ipfilter/ipsend/iptest.c b/contrib/ipfilter/ipsend/iptest.c index c1f42d2..3a0e39a 100644 --- a/contrib/ipfilter/ipsend/iptest.c +++ b/contrib/ipfilter/ipsend/iptest.c @@ -12,13 +12,14 @@ */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: iptest.c,v 2.1 1999/08/04 17:31:08 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: iptest.c,v 2.1.2.2 1999/11/28 03:43:45 darrenr Exp $"; #endif #include <stdio.h> #include <netdb.h> #include <unistd.h> #include <stdlib.h> #include <string.h> +#include <sys/param.h> #include <sys/types.h> #include <sys/time.h> #include <sys/socket.h> @@ -97,7 +98,8 @@ char **argv; struct tcpiphdr *ti; struct in_addr gwip; ip_t *ip; - char *name = argv[0], host[64], *gateway = NULL, *dev = NULL; + char *name = argv[0], host[MAXHOSTNAMELEN + 1]; + char *gateway = NULL, *dev = NULL; char *src = NULL, *dst; int mtu = 1500, tests = 0, pointtest = 0, c; @@ -153,6 +155,7 @@ char **argv; if (!src) { gethostname(host, sizeof(host)); + host[sizeof(host) - 1] = '\0'; src = host; } |