/*
- * $Id: IPInterception.cc,v 1.2 2002/09/24 11:56:50 robertc Exp $
+ * $Id: IPInterception.cc,v 1.3 2002/09/27 11:21:10 robertc Exp $
*
* DEBUG: section 89 NAT / IP Interception
* AUTHOR: Robert Collins
#endif
void
-rewriteURIwithInterceptedDetails(char const *originalURL, char *uriBuffer, size_t bufferLength, struct sockaddr_in me, struct sockaddr_in peer, int vport)
+rewriteURIwithInterceptedDetails(char const *originalURL, char *uriBuffer, size_t bufferLength, int fd, struct sockaddr_in me, struct sockaddr_in peer, int vport)
{
#if IPF_TRANSPARENT
struct natlookup natLookup;
static int pffd = -1;
#endif
#if LINUX_NETFILTER
- size_t sock_sz = sizeof(conn->me);
+ size_t sock_sz = sizeof(me);
#endif
#if IPF_TRANSPARENT
natLookup.nl_inport = me.sin_port;
#else
#if LINUX_NETFILTER
/* If the call fails the address structure will be unchanged */
- getsockopt(conn->fd, SOL_IP, SO_ORIGINAL_DST, &conn->me, &sock_sz);
+ getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &me, &sock_sz);
debug(89, 5) ("rewriteURIwithInterceptedDetails: addr = %s",
- inet_ntoa(conn->me.sin_addr));
+ inet_ntoa(me.sin_addr));
if (vport_mode)
vport = (int) ntohs(me.sin_port);
#endif
/*
- * $Id: IPInterception.h,v 1.1 2002/09/24 10:46:43 robertc Exp $
+ * $Id: IPInterception.h,v 1.2 2002/09/27 11:21:10 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#define SQUID_IPINTERCEPTION_H
void
- rewriteURIwithInterceptedDetails(char const *originalURL, char *uriBuffer, size_t bufferLength, struct sockaddr_in me, struct sockaddr_in peer, int vport);
+ rewriteURIwithInterceptedDetails(char const *originalURL, char *uriBuffer, size_t bufferLength, int fd, struct sockaddr_in me, struct sockaddr_in peer, int vport);
#endif /* SQUID_IPINTERCEPTION_H */
/*
- * $Id: client_side.cc,v 1.595 2002/09/26 13:33:08 robertc Exp $
+ * $Id: client_side.cc,v 1.596 2002/09/27 11:21:09 robertc Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
vport = (int) ntohs(http->conn->me.sin_port);
else
vport = (int) Config.Accel.port;
- rewriteURIwithInterceptedDetails(url, http->uri, url_sz,
+ rewriteURIwithInterceptedDetails(url, http->uri, url_sz, http->conn->fd,
http->conn->me, http->conn->peer, vport);
debug(33, 5) ("VHOST REWRITE: '%s'\n", http->uri);
} else {