diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-10-31 11:08:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:23 -0500 |
commit | 4bec25c3cd8869fb4b0cb6f1139bc2672b5b14a7 (patch) | |
tree | e593e6ed630546b2894146cbda82ec96b6eb34c3 /src/or/or.h | |
parent | b7843ca5544e741e74fe5f93fb49579e01b468c8 (diff) | |
download | tor-4bec25c3cd8869fb4b0cb6f1139bc2672b5b14a7.tar.gz tor-4bec25c3cd8869fb4b0cb6f1139bc2672b5b14a7.zip |
Add {No,}IPv{4,6}Traffic options to SOCKSPort
These options are for telling the SOCKSPort that it should allow or
not allow connections to IPv4/IPv6 addresses.
These aren't implemented yet; this is just the code to read the
options and get them into the entrey_connection_t.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index 9d22e117de..8a77c94a49 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1225,6 +1225,15 @@ typedef struct listener_connection_t { uint8_t isolation_flags; /**@}*/ + /** For a SOCKS listener, these fields describe whether we should + * allow IPv4 and IPv6 addresses from our exit nodes, respectively. + * + * @{ + */ + unsigned int socks_ipv4_traffic : 1; + unsigned int socks_ipv6_traffic : 1; + /** @} */ + } listener_connection_t; /** Minimum length of the random part of an AUTH_CHALLENGE cell. */ @@ -1522,6 +1531,13 @@ typedef struct entry_connection_t { */ unsigned int may_use_optimistic_data : 1; + /** Should we permit IPv4 and IPv6 traffic to use this connection? + * + * @{ */ + unsigned int ipv4_traffic_ok : 1; + unsigned int ipv6_traffic_ok : 1; + /** @} */ + } entry_connection_t; /** Subtype of connection_t for an "directory connection" -- that is, an HTTP @@ -3044,6 +3060,8 @@ typedef struct port_cfg_t { unsigned int all_addrs : 1; unsigned int ipv4_only : 1; unsigned int ipv6_only : 1; + unsigned int ipv4_traffic : 1; + unsigned int ipv6_traffic : 1; /* Unix sockets only: */ /** Path for an AF_UNIX address */ |