Skip to content

Fix Alert timeout#96

Merged
obgm merged 1 commit intoeclipse-tinydtls:developfrom
bosch-io:fix_alert_timeout
Feb 25, 2022
Merged

Fix Alert timeout#96
obgm merged 1 commit intoeclipse-tinydtls:developfrom
bosch-io:fix_alert_timeout

Conversation

@boaks
Copy link
Copy Markdown
Contributor

@boaks boaks commented Jul 10, 2021

Fix waiting without timeout in DTLS_STATE_CLOSING after Alert.

Sending Alert according RFC6347 without retransmission is not reliable.
Therefore a dummy retransmission entry is used for outgoing Alerts. On
retransmission, the Alert is not retransmitted, instead handle_alert is
called to emulate receiving the response.

Issue #95

@boaks
Copy link
Copy Markdown
Contributor Author

boaks commented Jul 10, 2021

Just to mention:

Using this with the libcoap examples results in leaks reported by valgrind.
I'm not sure, if the "cleanup" must take care of such retransmission jobs, or if the "shutdown" must now wait for the response or timeout.

@boaks boaks force-pushed the fix_alert_timeout branch from 0120115 to 1854f60 Compare July 11, 2021 10:29
@boaks
Copy link
Copy Markdown
Contributor Author

boaks commented Jul 11, 2021

One idea to fix the resulting leak is to add a dtls_stop_retransmission call to dtls_destroy_peer. For me this makes sense, but I'm not sure, if there are use-cases, where this is not intended. If a dtls_stop_retransmission call is added to dtls_destroy_peer, then the most caller of dtls_destroy_peer may remove it ... which would obsolete the extra dtls_reset_peer, though that adds only the obsoleted dtls_stop_retransmission.

@boaks boaks force-pushed the fix_alert_timeout branch 3 times, most recently from 1f4067b to 4f9184b Compare October 1, 2021 16:26
@boaks boaks force-pushed the fix_alert_timeout branch 3 times, most recently from 9de6c43 to 3ce625a Compare November 24, 2021 18:20
@boaks boaks force-pushed the fix_alert_timeout branch 2 times, most recently from 3ff5f74 to 1dbada8 Compare December 8, 2021 14:34
@boaks boaks force-pushed the fix_alert_timeout branch from 1dbada8 to cda7303 Compare December 23, 2021 19:10
@boaks boaks force-pushed the fix_alert_timeout branch from cda7303 to 0b39ffd Compare January 21, 2022 08:18
@boaks boaks force-pushed the fix_alert_timeout branch from 0b39ffd to b7552ec Compare February 4, 2022 08:54
Copy link
Copy Markdown
Contributor

@obgm obgm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the missing documentation of the new enum and field in netq.h, see below.

Sending Alert according RFC6347 without retransmission is not reliable.
Therefore a dummy retransmission entry is used for outgoing Alerts. On
retransmission, the Alert is not retransmitted, instead handle_alert is
called to emulate receiving the response.

Fixes: Issue eclipse-tinydtls#95

Signed-off-by: Achim Kraus <achim.kraus@bosch.io>
@boaks boaks force-pushed the fix_alert_timeout branch from b7552ec to 5e37fb8 Compare February 25, 2022 14:35
@boaks
Copy link
Copy Markdown
Contributor Author

boaks commented Feb 25, 2022

I added some documentation. Not sure, if you prefer to have more details on the jobs and how the processing will be done. If so, let me know.

@obgm obgm merged commit 71845d7 into eclipse-tinydtls:develop Feb 25, 2022
@boaks boaks deleted the fix_alert_timeout branch May 23, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants