Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
60312dc0
Commit
60312dc0
authored
9 years ago
by
teor (Tim Wilson-Brown)
Browse files
Options
Downloads
Patches
Plain Diff
Update comments about ExitPolicy parsing
Fix incomplete and incorrect comments. Comment changes only.
parent
a444b113
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/address.h
+3
-0
3 additions, 0 deletions
src/common/address.h
src/or/policies.c
+1
-1
1 addition, 1 deletion
src/or/policies.c
src/or/routerparse.c
+7
-3
7 additions, 3 deletions
src/or/routerparse.c
with
11 additions
and
4 deletions
src/common/address.h
+
3
−
0
View file @
60312dc0
...
...
@@ -227,6 +227,9 @@ int tor_addr_parse_PTR_name(tor_addr_t *result, const char *address,
int
tor_addr_port_lookup
(
const
char
*
s
,
tor_addr_t
*
addr_out
,
uint16_t
*
port_out
);
/* Does the address * yield an AF_UNSPEC wildcard address (1) and do we
* allow *4 and *6 for IPv4 and IPv6 wildcards, respectively;
* or does the address * yield IPv4 wildcard address (0). */
#define TAPMP_EXTENDED_STAR 1
int
tor_addr_parse_mask_ports
(
const
char
*
s
,
unsigned
flags
,
tor_addr_t
*
addr_out
,
maskbits_t
*
mask_out
,
...
...
This diff is collapsed.
Click to expand it.
src/or/policies.c
+
1
−
1
View file @
60312dc0
...
...
@@ -152,7 +152,7 @@ policy_expand_unspec(smartlist_t **policy)
}
/**
* Given a linked list of config lines containing "a
llow" and "deny
"
* Given a linked list of config lines containing "a
ccept[6]" and "reject[6]
"
* tokens, parse them and append the result to <b>dest</b>. Return -1
* if any tokens are malformed (and don't append any), else return 0.
*
...
...
This diff is collapsed.
Click to expand it.
src/or/routerparse.c
+
7
−
3
View file @
60312dc0
...
...
@@ -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 address
es
, plus 2
1
characters.
* "accept6 ffff:ffff:..255/
128
:10000-65535",
* which contains
a
max-length IPv6 address, plus 2
4
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment