svn commit: r186673 - user/kmacy/HEAD_fast_net/contrib/ipfilter/tools

Kip Macy kmacy at FreeBSD.org
Thu Jan 1 03:10:12 UTC 2009


Author: kmacy
Date: Thu Jan  1 03:10:11 2009
New Revision: 186673
URL: http://svn.freebsd.org/changeset/base/186673

Log:
  update if_output call

Modified:
  user/kmacy/HEAD_fast_net/contrib/ipfilter/tools/ipftest.c

Modified: user/kmacy/HEAD_fast_net/contrib/ipfilter/tools/ipftest.c
==============================================================================
--- user/kmacy/HEAD_fast_net/contrib/ipfilter/tools/ipftest.c	Thu Jan  1 03:08:34 2009	(r186672)
+++ user/kmacy/HEAD_fast_net/contrib/ipfilter/tools/ipftest.c	Thu Jan  1 03:10:11 2009	(r186673)
@@ -9,6 +9,9 @@
 #include "ipt.h"
 #include <sys/ioctl.h>
 #include <sys/file.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/route.h>
 
 #if !defined(lint)
 static const char sccsid[] = "@(#)ipt.c	1.19 6/3/96 (C) 1993-2000 Darren Reed";
@@ -282,16 +285,20 @@ char *argv[];
 			printf("--------------");
 		} else if ((opts & (OPT_BRIEF|OPT_NAT)) == (OPT_NAT|OPT_BRIEF))
 			printpacket(ip);
-		if (dir && (ifp != NULL) && IP_V(ip) && (m != NULL))
+		if (dir && (ifp != NULL) && IP_V(ip) && (m != NULL)) {
+			struct route ro;
+			bzero(&ro, sizeof(ro));
 #if  defined(__sgi) && (IRIX < 60500)
 			(*ifp->if_output)(ifp, (void *)m, NULL);
 #else
 # if TRU64 >= 1885
 			(*ifp->if_output)(ifp, (void *)m, NULL, 0, 0);
 # else
-			(*ifp->if_output)(ifp, (void *)m, NULL, 0);
+			(*ifp->if_output)(ifp, (void *)m, &ro);
 # endif
 #endif
+		}
+		
 		if ((opts & (OPT_BRIEF|OPT_NAT)) != (OPT_NAT|OPT_BRIEF))
 			putchar('\n');
 		dir = 0;


More information about the svn-src-user mailing list