aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2015-04-23 23:51:59 +1000
committerteor <teor2345@gmail.com>2015-04-23 23:59:19 +1000
commit9a34caa4e7867c90e8d5280d84fce9cf264c1c38 (patch)
tree79a60c0081dfd3a53ba1aa107d23e93593f23302 /src/or/routerparse.c
parentc3894473fee0199de50904973abb75fe2935451f (diff)
downloadtor-9a34caa4e7867c90e8d5280d84fce9cf264c1c38.tar.gz
tor-9a34caa4e7867c90e8d5280d84fce9cf264c1c38.zip
Correct "longest possible policy" comment in router policy
The "longest possible policy" comment in router_parse_addr_policy_item_from_string() used an example policy that was actually shorter than the maximum length. This comment was amended, and expanded to count the maximum number of characters. Comment change only.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index b9a36a3eb1..d2eca62491 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3361,7 +3361,9 @@ router_parse_addr_policy_item_from_string,(const char *s, int assume_action))
{
directory_token_t *tok = NULL;
const char *cp, *eos;
- /* Longest possible policy is "accept ffff:ffff:..255/ffff:...255:0-65535".
+ /* Longest possible policy is
+ * "accept6 ffff:ffff:..255/ffff:...255:10000-65535",
+ * which contains 2 max-length IPv6 addresses, plus 21 characters.
* But note that there can be an arbitrary amount of space between the
* accept and the address:mask/port element. */
char line[TOR_ADDR_BUF_LEN*2 + 32];