Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
7d80921a
Commit
7d80921a
authored
Feb 13, 2006
by
Roger Dingledine
Browse files
resolve too-long-lines
svn:r6001
parent
6ce36ead
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/or/config.c
View file @
7d80921a
...
...
@@ -318,8 +318,9 @@ typedef struct {
config_var_t
*
vars
;
validate_fn_t
validate_fn
;
config_var_description_t
*
descriptions
;
config_var_t
*
extra
;
/**< If present, a LINELIST variable for unrecognized
* lines. Otherwise, unrecognized lines are an error. */
/** If present, extra is a LINELIST variable for unrecognized
* lines. Otherwise, unrecognized lines are an error. */
config_var_t
*
extra
;
}
config_format_t
;
#define CHECK(fmt, cfg) do { \
...
...
@@ -3227,10 +3228,14 @@ config_addr_policy_covers(addr_policy_t *a, addr_policy_t *b)
/* We can ignore accept/reject, since "accept *:80, reject *:80" reduces to
* "accept *:80". */
if
(
a
->
msk
&
~
b
->
msk
)
return
0
;
/* There's a wildcard bit in b->msk that's not a wildcard in a. */
if
((
a
->
addr
&
a
->
msk
)
!=
(
b
->
addr
&
a
->
msk
))
return
0
;
/* There's a fixed bit in a that's set differently in b. */
if
(
a
->
msk
&
~
b
->
msk
)
{
/* There's a wildcard bit in b->msk that's not a wildcard in a. */
return
0
;
}
if
((
a
->
addr
&
a
->
msk
)
!=
(
b
->
addr
&
a
->
msk
))
{
/* There's a fixed bit in a that's set differently in b. */
return
0
;
}
return
(
a
->
prt_min
<=
b
->
prt_min
&&
a
->
prt_max
>=
b
->
prt_max
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment