summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/ipft_tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/ipft_tx.c')
-rw-r--r--contrib/ipfilter/lib/ipft_tx.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/ipfilter/lib/ipft_tx.c b/contrib/ipfilter/lib/ipft_tx.c
index 04c2dab..302f177 100644
--- a/contrib/ipfilter/lib/ipft_tx.c
+++ b/contrib/ipfilter/lib/ipft_tx.c
@@ -1,13 +1,13 @@
/*
- * Copyright (C) 1995-2001 by Darren Reed.
+ * Copyright (C) 2000-2006 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
- * $Id: ipft_tx.c,v 1.15.2.7 2005/12/18 14:53:39 darrenr Exp $
+ * $Id: ipft_tx.c,v 1.15.2.9 2006/06/16 17:21:04 darrenr Exp $
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipft_tx.c 1.7 6/5/96 (C) 1993 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipft_tx.c,v 1.15.2.7 2005/12/18 14:53:39 darrenr Exp $";
+static const char rcsid[] = "@(#)$Id: ipft_tx.c,v 1.15.2.9 2006/06/16 17:21:04 darrenr Exp $";
#endif
#include <ctype.h>
@@ -127,6 +127,7 @@ int cnt, *dir;
{
register char *s;
char line[513];
+ ip_t *ip;
*ifn = NULL;
while (fgets(line, sizeof(line)-1, tfp)) {
@@ -142,12 +143,10 @@ int cnt, *dir;
printf("input: %s\n", line);
*ifn = NULL;
*dir = 0;
- if (!parseline(line, (ip_t *)buf, ifn, dir))
-#if 0
- return sizeof(ip_t) + sizeof(tcphdr_t);
-#else
- return sizeof(ip_t);
-#endif
+ if (!parseline(line, (ip_t *)buf, ifn, dir)) {
+ ip = (ip_t *)buf;
+ return ntohs(ip->ip_len);
+ }
}
if (feof(tfp))
return 0;
OpenPOWER on IntegriCloud