diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2015-09-09 23:48:33 +1000 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2015-09-14 11:12:28 +1000 |
commit | 60312dc08b30243740e85c2a944874014f682579 (patch) | |
tree | b240681a50c1f34e8690d31821871d739bbc20fa /src/or/routerparse.c | |
parent | a444b11323799536b4cd7902e29f711b0806293a (diff) | |
download | tor-60312dc08b30243740e85c2a944874014f682579.tar.gz tor-60312dc08b30243740e85c2a944874014f682579.zip |
Update comments about ExitPolicy parsing
Fix incomplete and incorrect comments.
Comment changes only.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index c2206f1075..d0b2cba19f 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3676,10 +3676,14 @@ 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 - * "accept6 ffff:ffff:..255/ffff:...255:10000-65535", - * which contains 2 max-length IPv6 addresses, plus 21 characters. + * "accept6 ffff:ffff:..255/128:10000-65535", + * which contains a max-length IPv6 address, plus 24 characters. * But note that there can be an arbitrary amount of space between the - * accept and the address:mask/port element. */ + * accept and the address:mask/port element. + * We don't need to multiply TOR_ADDR_BUF_LEN by 2, as there is only one + * IPv6 address. But making the buffer shorter might cause valid long lines, + * which parsed in previous versions, to fail to parse in new versions. + * (These lines would have to have excessive amounts of whitespace.) */ char line[TOR_ADDR_BUF_LEN*2 + 32]; addr_policy_t *r; memarea_t *area = NULL; |