diff -c -r squid-1.NOVM.20/src/Makefile squid-1.NOVM.20-ipfilter.patch/src/Makefile
*** squid-1.NOVM.20/src/Makefile	Sun Sep 20 19:53:51 1998
--- squid-1.NOVM.20-ipfilter.patch/src/Makefile	Sun Sep 20 19:54:52 1998
***************
*** 19,30 ****
  USE_BIN_TREE    = # -DUSE_BIN_TREE
  RELOAD_INTO_IMS	= # -DRELOAD_INTO_IMS
  UNDERSCORES_OPT = # -DALLOW_HOSTNAME_UNDERSCORES
  
  DEFINES         = $(HOST_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) \
                    $(ICMP_OPT) $(DELAY_HACK) $(USERAGENT_OPT) \
                    $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
                    $(USE_SPLAY_TREE) $(USE_BIN_TREE) \
! 		  $(RELOAD_INTO_IMS) $(UNDERSCORES_OPT)
  
  prefix		= /usr/local/squid
  exec_prefix	= ${prefix}
--- 19,32 ----
  USE_BIN_TREE    = # -DUSE_BIN_TREE
  RELOAD_INTO_IMS	= # -DRELOAD_INTO_IMS
  UNDERSCORES_OPT = # -DALLOW_HOSTNAME_UNDERSCORES
+ IPFILTER_OPT= -DWITH_IPFILTER=1
+ 
  
  DEFINES         = $(HOST_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) \
                    $(ICMP_OPT) $(DELAY_HACK) $(USERAGENT_OPT) \
                    $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
                    $(USE_SPLAY_TREE) $(USE_BIN_TREE) \
! 		  $(RELOAD_INTO_IMS) $(UNDERSCORES_OPT) $(IPFILTER_OPT)
  
  prefix		= /usr/local/squid
  exec_prefix	= ${prefix}
diff -c -r squid-1.NOVM.20/src/Makefile.in squid-1.NOVM.20-ipfilter.patch/src/Makefile.in
*** squid-1.NOVM.20/src/Makefile.in	Sat Nov  1 01:38:13 1997
--- squid-1.NOVM.20-ipfilter.patch/src/Makefile.in	Sun Jan 18 14:44:11 1998
***************
*** 18,29 ****
  USE_BIN_TREE    = # -DUSE_BIN_TREE
  RELOAD_INTO_IMS	= # -DRELOAD_INTO_IMS
  UNDERSCORES_OPT = # -DALLOW_HOSTNAME_UNDERSCORES
  
  DEFINES         = $(HOST_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) \
                    $(ICMP_OPT) $(DELAY_HACK) $(USERAGENT_OPT) \
                    $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
                    $(USE_SPLAY_TREE) $(USE_BIN_TREE) \
! 		  $(RELOAD_INTO_IMS) $(UNDERSCORES_OPT)
  
  prefix		= @prefix@
  exec_prefix	= @exec_prefix@
--- 18,31 ----
  USE_BIN_TREE    = # -DUSE_BIN_TREE
  RELOAD_INTO_IMS	= # -DRELOAD_INTO_IMS
  UNDERSCORES_OPT = # -DALLOW_HOSTNAME_UNDERSCORES
+ IPFILTER_OPT= -DWITH_IPFILTER=1
+ 
  
  DEFINES         = $(HOST_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) \
                    $(ICMP_OPT) $(DELAY_HACK) $(USERAGENT_OPT) \
                    $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
                    $(USE_SPLAY_TREE) $(USE_BIN_TREE) \
! 		  $(RELOAD_INTO_IMS) $(UNDERSCORES_OPT) $(IPFILTER_OPT)
  
  prefix		= @prefix@
  exec_prefix	= @exec_prefix@
Only in squid-1.NOVM.20-ipfilter.patch/src: Makefile.in.orig
Only in squid-1.NOVM.20-ipfilter.patch/src: Makefile.orig
diff -c -r squid-1.NOVM.20/src/cache_cf.c squid-1.NOVM.20-ipfilter.patch/src/cache_cf.c
*** squid-1.NOVM.20/src/cache_cf.c	Sat Jan 10 10:38:56 1998
--- squid-1.NOVM.20-ipfilter.patch/src/cache_cf.c	Sun Jan 18 14:44:18 1998
***************
*** 1113,1118 ****
--- 1113,1123 ----
  	else if (!strcmp(token, "httpd_accel_uses_host_header"))
  	    parseOnOff(&opt_accel_uses_host);
  
+ #if WITH_IPFILTER
+ 	else if (!strcmp(token, "httpd_accel_uses_ipfilter_redirect"))
+ 	    parseOnOff(&opt_accel_uses_ipfilter_redirect);
+ #endif
+ 
  	else if (!strcmp(token, "httpd_accel"))
  	    parseHttpdAccelLine();
  
Only in squid-1.NOVM.20-ipfilter.patch/src: cache_cf.c.orig
diff -c -r squid-1.NOVM.20/src/icp.c squid-1.NOVM.20-ipfilter.patch/src/icp.c
*** squid-1.NOVM.20/src/icp.c	Fri Dec 19 01:19:09 1997
--- squid-1.NOVM.20-ipfilter.patch/src/icp.c	Sun Jan 18 14:44:25 1998
***************
*** 105,110 ****
--- 105,118 ----
   */
  
  #include "squid.h"
+ #if WITH_IPFILTER
+ #include <sys/ioctl.h>
+ #include <netinet/in_systm.h>
+ #include <net/if.h>
+ #include "/sys/netinet/ip_compat.h"
+ #include "/sys/netinet/ip_fil.h"
+ #include "/sys/netinet/ip_nat.h"
+ #endif
  
  int neighbors_do_private_keys = 1;
  
***************
*** 1601,1607 ****
  	*t = '\0';
      if ((t = strchr(url, '#')))	/* remove HTML anchors */
  	*t = '\0';
- 
      /* see if we running in httpd_accel_mode, if so got to convert it to URL */
      if (httpd_accel_mode && *url == '/') {
  	/* prepend the accel prefix */
--- 1609,1614 ----
***************
*** 1629,1635 ****
  	    icpState->url = xcalloc(url_sz, 1);
  	    sprintf(icpState->url, "http://%s:%d%s",
  		t, (int) Config.Accel.port, url);
! 	} else {
  	    url_sz = strlen(Config.Accel.prefix) + strlen(url) +
  		Config.appendDomainLen + 1;
  	    icpState->url = xcalloc(url_sz, 1);
--- 1636,1679 ----
  	    icpState->url = xcalloc(url_sz, 1);
  	    sprintf(icpState->url, "http://%s:%d%s",
  		t, (int) Config.Accel.port, url);
! 	} 
! #if WITH_IPFILTER
! 	else if (opt_accel_uses_ipfilter_redirect) {
! 	  natlookup_t	natlook;
! 	  int ffd;
! 	  /*
! 	   * Build up the NAT natlookup structure.
! 	   */
! 	  bzero((char *)&natlook, sizeof(natlook));
! 	  natlook.nl_outip = icpState->peer.sin_addr;
! 	  natlook.nl_inip = icpState->me.sin_addr;
! 	  natlook.nl_flags = IPN_TCP;
! 	  natlook.nl_outport = icpState->peer.sin_port;
! 	  natlook.nl_inport = icpState->me.sin_port;
! 
! 	/*
! 	 * Open the NAT device and lookup the mapping pair.
! 	 */
! 	  ffd = open(IPL_NAT, O_RDONLY);
! 	  if (ioctl(ffd, SIOCGNATL, &natlook) == -1) {
! 	    syslog(LOG_DAEMON|LOG_INFO,"cannot access to %s",IPL_NAT);
! 	    close (ffd);
! 	    goto Z;
! 	  }
! 	  close(ffd);
! 	  syslog(LOG_DAEMON|LOG_INFO, "connect to %s,%d",
! 		 inet_ntoa(natlook.nl_realip), ntohs(natlook.nl_realport));
! 	  url_sz = strlen(url) + 32 + Config.appendDomainLen;
! 	  icpState->url = xcalloc(url_sz, 1);
! 	  sprintf(icpState->url, "http://%s:%d%s",
! 		  inet_ntoa(natlook.nl_realip),
! 		  (int)ntohs(natlook.nl_realport),
! 		  url);
! 	  debug(12, 5, "VHOST REWRITE: '%s'\n", icpState->url);
! 	}
! #endif
! 	else {
! 	Z:
  	    url_sz = strlen(Config.Accel.prefix) + strlen(url) +
  		Config.appendDomainLen + 1;
  	    icpState->url = xcalloc(url_sz, 1);
Only in squid-1.NOVM.20-ipfilter.patch/src: icp.c.orig
diff -c -r squid-1.NOVM.20/src/main.c squid-1.NOVM.20-ipfilter.patch/src/main.c
*** squid-1.NOVM.20/src/main.c	Fri Dec 19 01:19:12 1997
--- squid-1.NOVM.20-ipfilter.patch/src/main.c	Sun Jan 18 14:44:31 1998
***************
*** 124,129 ****
--- 124,132 ----
  int opt_mem_pools = 0;
  int opt_forwarded_for = 1;
  int opt_accel_uses_host = 0;
+ #if WITH_IPFILTER
+ int opt_accel_uses_ipfilter_redirect = 0;
+ #endif
  int vhost_mode = 0;
  int Squid_MaxFD = SQUID_MAXFD;
  int Biggest_FD = -1;
Only in squid-1.NOVM.20-ipfilter.patch/src: main.c.orig
diff -c -r squid-1.NOVM.20/src/squid.h squid-1.NOVM.20-ipfilter.patch/src/squid.h
*** squid-1.NOVM.20/src/squid.h	Sat Nov  1 01:38:21 1997
--- squid-1.NOVM.20-ipfilter.patch/src/squid.h	Sun Jan 18 14:44:36 1998
***************
*** 351,356 ****
--- 351,359 ----
  extern int opt_mem_pools;	/* main.c */
  extern int opt_forwarded_for;	/* main.c */
  extern int opt_accel_uses_host;	/* main.c */
+ #if WITH_IPFILTER
+ extern int opt_accel_uses_ipfilter_redirect;	/* main.c */
+ #endif
  extern char ThisCache[];	/* main.c */
  
  /* Prototypes and definitions which don't really deserve a separate
Only in squid-1.NOVM.20-ipfilter.patch/src: squid.h.orig
