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
David Goulet
Tor
Commits
11f1b7d9
Commit
11f1b7d9
authored
Jul 26, 2013
by
Nick Mathewson
👁
Browse files
Avoid assertion failure on unexepcted address family in DNS reply.
Fixes bug 9337; bugfix on 0.2.4.7-alpha.
parent
1d2e8020
Changes
2
Show whitespace changes
Inline
Side-by-side
changes/bug9337
0 → 100644
View file @
11f1b7d9
o Major bugfixes (DNS):
- Avoid an assertion failure when processing DNS replies without the
answer types we expected. Fixes bug 9337; bugfix on 0.2.4.7-alpha.
src/or/dns.c
View file @
11f1b7d9
...
...
@@ -437,8 +437,8 @@ cached_resolve_add_answer(cached_resolve_t *resolve,
if
(
resolve
->
res_status_ipv4
!=
RES_STATUS_INFLIGHT
)
return
;
if
(
dns_result
==
DNS_ERR_NONE
&&
answer_addr
)
{
tor_assert
(
tor_addr_family
(
answer_addr
)
==
AF_INET
)
;
if
(
dns_result
==
DNS_ERR_NONE
&&
answer_addr
&&
tor_addr_family
(
answer_addr
)
==
AF_INET
)
{
resolve
->
result_ipv4
.
addr_ipv4
=
tor_addr_to_ipv4h
(
answer_addr
);
resolve
->
res_status_ipv4
=
RES_STATUS_DONE_OK
;
}
else
{
...
...
@@ -450,8 +450,8 @@ cached_resolve_add_answer(cached_resolve_t *resolve,
if
(
resolve
->
res_status_ipv6
!=
RES_STATUS_INFLIGHT
)
return
;
if
(
dns_result
==
DNS_ERR_NONE
&&
answer_addr
)
{
tor_assert
(
tor_addr_family
(
answer_addr
)
==
AF_INET6
)
;
if
(
dns_result
==
DNS_ERR_NONE
&&
answer_addr
&&
tor_addr_family
(
answer_addr
)
==
AF_INET6
)
{
memcpy
(
&
resolve
->
result_ipv6
.
addr_ipv6
,
tor_addr_to_in6
(
answer_addr
),
sizeof
(
struct
in6_addr
));
...
...
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