[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r7012: Fix verbose compilation errors; make sure transparent proxy (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r7012: Fix verbose compilation errors; make sure transparent proxy (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Thu, 10 Aug 2006 05:02:50 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 10 Aug 2006 05:03:01 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-08-10 05:02:26 -0400 (Thu, 10 Aug 2006)
New Revision: 7012
Modified:
tor/trunk/
tor/trunk/src/or/config.c
tor/trunk/src/or/connection_edge.c
tor/trunk/src/or/dns.c
Log:
r7304@Kushana: nickm | 2006-08-10 01:58:05 -0700
Fix verbose compilation errors; make sure transparent proxy fails when no method is configured.
Property changes on: tor/trunk
___________________________________________________________________
Name: svk:merge
- 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8245
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7303
+ 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8245
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7304
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2006-08-10 09:02:12 UTC (rev 7011)
+++ tor/trunk/src/or/config.c 2006-08-10 09:02:26 UTC (rev 7012)
@@ -2072,6 +2072,7 @@
for (i = 0; i < 2; ++i) {
int is_socks = i==0;
config_line_t *line, *opt, *old;
+ const char *tp = is_socks ? "SOCKS proxy" : "transparent proxy";
if (is_socks) {
opt = options->SocksListenAddress;
old = old_options->SocksListenAddress;
@@ -2079,7 +2080,6 @@
opt = options->TransListenAddress;
old = old_options->TransListenAddress;
}
- const char *tp = is_socks ? "SOCKS proxy" : "transparent proxy";
for (line = opt; line; line = line->next) {
char *address = NULL;
Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c 2006-08-10 09:02:12 UTC (rev 7011)
+++ tor/trunk/src/or/connection_edge.c 2006-08-10 09:02:26 UTC (rev 7012)
@@ -1290,9 +1290,9 @@
tor_inet_ntoa(&orig_dst.sin_addr, tmpbuf, sizeof(tmpbuf));
strlcpy(req->address, tmpbuf, sizeof(req->address));
req->port = ntohs(orig_dst.sin_port);
-#endif
-#ifdef TRANS_PF
+ return 0;
+#elif defined(TRANS_PF)
struct sockaddr_in proxy_addr;
socklen_t proxy_addr_len = sizeof(proxy_addr);
char tmpbuf[INET_NTOA_BUF_LEN];
@@ -1327,9 +1327,15 @@
tor_inet_ntoa(&pnl.rdaddr.v4, tmpbuf, sizeof(tmpbuf));
strlcpy(req->address, tmpbuf, sizeof(req->address));
req->port = ntohs(pnl.rdport);
-#endif
return 0;
+#else
+ (void)conn;
+ (void)req;
+ log_warn(LD_BUG, "Called connection_ap_get_original_destination, but no "
+ "transparent proxy method was configured.");
+ return -1;
+#endif
}
/** connection_edge_process_inbuf() found a conn in state
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2006-08-10 09:02:12 UTC (rev 7011)
+++ tor/trunk/src/or/dns.c 2006-08-10 09:02:26 UTC (rev 7012)
@@ -95,7 +95,7 @@
pending_connection_t *pending_connections;
} cached_resolve_t;
-static void purge_expired_resolves(uint32_t now);
+static void purge_expired_resolves(time_t now);
static void dns_found_answer(const char *address, uint32_t addr, char outcome,
uint32_t ttl);
static void send_resolved_cell(edge_connection_t *conn, uint8_t answer_type);
@@ -253,7 +253,7 @@
/** Remove every cached_resolve whose <b>expire</b> time is before <b>now</b>
* from the cache. */
static void
-purge_expired_resolves(uint32_t now)
+purge_expired_resolves(time_t now)
{
cached_resolve_t *resolve, *removed;
pending_connection_t *pend;
@@ -386,7 +386,7 @@
pending_connection_t *pending_connection;
struct in_addr in;
circuit_t *circ;
- uint32_t now = time(NULL);
+ time_t now = time(NULL);
assert_connection_ok(TO_CONN(exitconn), 0);
tor_assert(exitconn->_base.s == -1);