mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
checkpoint changelog and general polishing
svn:r8497
This commit is contained in:
+3
-2
@@ -1326,7 +1326,8 @@ list_getinfo_options(void)
|
||||
|
||||
/** Lookup the 'getinfo' entry <b>question</b>, and return
|
||||
* the answer in <b>*answer</b> (or NULL if key not recognized).
|
||||
* Return 0 if success, or -1 if recognized but internal error. */
|
||||
* Return 0 if success or unrecognized, or -1 if recognized but
|
||||
* internal error. */
|
||||
static int
|
||||
handle_getinfo_helper(const char *question, char **answer)
|
||||
{
|
||||
@@ -1572,7 +1573,7 @@ handle_getinfo_helper(const char *question, char **answer)
|
||||
} else if (!strcmpstart(question, "exit-policy/")) {
|
||||
return policies_getinfo_helper(question, answer);
|
||||
}
|
||||
return 0;
|
||||
return 0; /* unrecognized */
|
||||
}
|
||||
|
||||
/** Called when we receive a GETINFO command. Try to fetch all requested
|
||||
|
||||
+2
-2
@@ -1025,8 +1025,8 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
|
||||
} else {
|
||||
/* Can we even end up here? -- weasel*/
|
||||
source = NS_FROM_DIR_BY_FP;
|
||||
log_warn(LD_BUG, "we received a networkstatus but we did neither ask"
|
||||
"for it by fp/ nor did we ask for all.");
|
||||
log_warn(LD_BUG, "we received a networkstatus but we didn't ask"
|
||||
"for it by fp/ or ask for all.");
|
||||
}
|
||||
cp = body;
|
||||
while (*cp) {
|
||||
|
||||
+8
-8
@@ -525,8 +525,8 @@ parse_inaddr_arpa_address(const char *address, struct in_addr *in)
|
||||
* if resolve valid, put it into <b>exitconn</b>-\>addr and return 1.
|
||||
* If resolve failed, unlink exitconn if needed, free it, and return -1.
|
||||
*
|
||||
* If <b>circ</b> is provided, and this is a resolve request, we have
|
||||
* a cached answer, send the answer back along circ; otherwise, send
|
||||
* If <b>oncirc</b> is provided, and this is a resolve request, we have
|
||||
* a cached answer, send the answer back along oncirc; otherwise, send
|
||||
* the answer back along <b>exitconn</b>'s attached circuit.
|
||||
*
|
||||
* Else, if seen before and pending, add conn to the pending list,
|
||||
@@ -571,7 +571,7 @@ dns_resolve(edge_connection_t *exitconn, or_circuit_t *oncirc)
|
||||
|
||||
/* Check whether this is a reverse lookup. If it's malformed, or it's a
|
||||
* .in-addr.arpa address but this isn't a resolve request, kill the
|
||||
* connecction.
|
||||
* connection.
|
||||
*/
|
||||
if ((r = parse_inaddr_arpa_address(exitconn->_base.address, NULL)) != 0) {
|
||||
if (r == 1)
|
||||
@@ -833,8 +833,8 @@ dns_cancel_pending_resolve(const char *address)
|
||||
}
|
||||
|
||||
/** Helper: adds an entry to the DNS cache mapping <b>address</b> to the ipv4
|
||||
* address <b>addr</b> (if is_reverse is 0) or the hostname <b>hostname</b> if
|
||||
* (is_reverse is 1). <b>ttl</b> is a cache ttl; <b>outcome</b> is one of
|
||||
* address <b>addr</b> (if is_reverse is 0) or the hostname <b>hostname</b> (if
|
||||
* is_reverse is 1). <b>ttl</b> is a cache ttl; <b>outcome</b> is one of
|
||||
* DNS_RESOLVE_{FAILED_TRANSIENT|FAILED_PERMANENT|SUCCEEDED}.
|
||||
**/
|
||||
static void
|
||||
@@ -1727,15 +1727,15 @@ dns_launch_wildcard_checks(void)
|
||||
for (i = 0; i < N_WILDCARD_CHECKS; ++i) {
|
||||
/* RFC2606 reserves these. Sadly, some DNS hijackers, in a silly attempt
|
||||
* to 'comply' with rfc2606, refrain from giving A records for these.
|
||||
* This is the standards-complaince equivalent of making sure that your
|
||||
* This is the standards-compliance equivalent of making sure that your
|
||||
* crackhouse's elevator inspection certificate is up to date.
|
||||
*/
|
||||
launch_wildcard_check(2, 16, "%s.invalid");
|
||||
launch_wildcard_check(2, 16, "%s.test");
|
||||
|
||||
/* Thy somese will break specs if there are ever any number of
|
||||
/* These will break specs if there are ever any number of
|
||||
* 8+-character top-level domains. */
|
||||
launch_wildcard_check(8, 16,"");
|
||||
launch_wildcard_check(8, 16, "");
|
||||
|
||||
/* Try some random .com/org/net domains. This will work fine so long as
|
||||
* not too many resolve to the same place. */
|
||||
|
||||
+4
-2
@@ -348,7 +348,9 @@ typedef enum {
|
||||
#define _DIR_PURPOSE_MAX 9
|
||||
|
||||
#define _EXIT_PURPOSE_MIN 1
|
||||
/** This exit stream wants to do an ordinary connect. */
|
||||
#define EXIT_PURPOSE_CONNECT 1
|
||||
/** This exit stream wants to do a resolve (either normal or reverse). */
|
||||
#define EXIT_PURPOSE_RESOLVE 2
|
||||
#define _EXIT_PURPOSE_MAX 2
|
||||
|
||||
@@ -1575,10 +1577,10 @@ typedef struct {
|
||||
* addresses to be FQDNs, but rather search for them in
|
||||
* the local domains. */
|
||||
int ServerDNSDetectHijacking; /**< Boolean: If true, check for DNS failure
|
||||
* hijacking */
|
||||
* hijacking. */
|
||||
char *ServerDNSResolvConfFile; /**< If provided, we configure our internal
|
||||
* resolver from the file here rather than from
|
||||
* /etc/resolv.conf (unix) or the registry (windows) */
|
||||
* /etc/resolv.conf (Unix) or the registry (Windows). */
|
||||
} or_options_t;
|
||||
|
||||
/** Persistent state for an onion router, as saved to disk. */
|
||||
|
||||
Reference in New Issue
Block a user