Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
Knot Resolver
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Anbang Wen
Knot Resolver
Commits
4486595b
Verified
Commit
4486595b
authored
Jan 05, 2018
by
Grigorii Demidov
Committed by
Petr Špaček
Jan 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daemon: kresd fall into endless loop in some circumstances when tls is used; fix
parent
90e397b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
daemon/tls.c
daemon/tls.c
+1
-0
daemon/worker.c
daemon/worker.c
+14
-2
No files found.
daemon/tls.c
View file @
4486595b
...
...
@@ -869,6 +869,7 @@ int tls_client_push(struct qr_task *task, uv_handle_t *handle, knot_pkt_t *pkt)
return
kr_error
(
EIO
);
}
}
else
{
retries
=
0
;
submitted
+=
count
;
if
(
count
==
0
&&
submitted
!=
sizeof
(
pkt_size
)
+
pkt
->
size
)
{
kr_log_error
(
"[tls_client] gnutls_record_uncork didn't send all data: %s (%zd)
\n
"
,
...
...
daemon/worker.c
View file @
4486595b
...
...
@@ -804,9 +804,21 @@ static int qr_task_on_send(struct qr_task *task, uv_handle_t *handle, int status
if
(
session
->
closing
)
{
return
status
;
}
/* Finalize the task, if any errors.
* We can't add it to the end of waiting list for retrying
* since it may lead endless loop in some circumstances
* (for instance: tls; send->tls_push->too many non-critical errors->
* on_send with nonzero status->re-add to waiting->send->etc).*/
if
(
status
!=
0
)
{
/* Add to the end for retry */
session_add_waiting
(
session
,
task
);
qr_task_finalize
(
task
,
KR_STATE_FAIL
);
if
(
session
->
outgoing
)
{
qr_task_finalize
(
task
,
KR_STATE_FAIL
);
}
else
{
assert
(
task
->
ctx
->
source
.
session
==
session
);
task
->
ctx
->
source
.
session
=
NULL
;
}
session_del_tasks
(
session
,
task
);
qr_task_unref
(
task
);
}
if
(
session
->
waiting
.
len
>
0
)
{
struct
qr_task
*
t
=
session
->
waiting
.
at
[
0
];
...
...
Write
Preview
Markdown
is supported
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