From 80622c0664741e7947ace3972d106d94340aaf7c Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 21 Sep 2014 14:35:48 +0300 Subject: Writing comments for newly added functions. --- src/or/policies.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/or/policies.c') diff --git a/src/or/policies.c b/src/or/policies.c index ffeda1fa4c..7090eda2c4 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -984,6 +984,18 @@ policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, return 0; } +/** Parse exit policy in cfg into dest smartlist. + * + * Add entry that rejects all IPv6 destinations unless + * EXIT_POLICY_IPV6_ENABLED bit is set in options bitmask. + * + * If EXIT_POLICY_REJECT_PRIVATE bit is set in options, + * do add entry that rejects all destinations in private subnetwork + * Tor is running in. + * + * Respectively, if EXIT_POLICY_ADD_DEFAULT bit is set, add + * default exit policy entries to result smartlist. + */ int policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest, exit_policy_parser_cfg_t options, @@ -999,6 +1011,18 @@ policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest, add_default); } +/** Parse ExitPolicy member of or_options into result + * smartlist. + * If or_options->IPv6Exit is false, add an entry that + * rejects all IPv6 destinations. + * + * If or_options->ExitPolicyRejectPrivate is true, add entry that + * rejects all destinations in the private subnetwork of machine Tor + * instance is running in. + * + * If or_options->BridgeRelay is false, add entries of default + * Tor exit policy into result smartlist. + */ int policies_parse_exit_policy_from_options(const or_options_t *or_options, uint32_t local_address, -- cgit v1.2.3-54-g00ecf