-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg/tinydtls/contrib/sock_dtls: fix ep_to_session #17849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
miri64
merged 1 commit into
RIOT-OS:master
from
leandrolanzieri:pr/pkg/tinydtls/fix_ep_to_session
Mar 25, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
pkg/tinydtls/patches/0002-session.h-Modify-session_t-for-RIOT.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| From 6fbe634900e15b006edf3d6c9a6b79f19d286840 Mon Sep 17 00:00:00 2001 | ||
| From: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de> | ||
| Date: Thu, 24 Mar 2022 12:00:27 +0100 | ||
| Subject: [PATCH] session.h: Modify session_t for RIOT | ||
|
|
||
| Now the addr member of session_t includes both the IPv6 address and the | ||
| port. | ||
| --- | ||
| session.c | 4 ++-- | ||
| session.h | 6 ++++-- | ||
| 2 files changed, 6 insertions(+), 4 deletions(-) | ||
|
|
||
| diff --git a/session.c b/session.c | ||
| index 300224e..020ab5b 100644 | ||
| --- a/session.c | ||
| +++ b/session.c | ||
| @@ -34,8 +34,8 @@ | ||
| #elif defined(WITH_RIOT_GNRC) | ||
| #define _dtls_address_equals_impl(A,B) \ | ||
| ((A)->size == (B)->size \ | ||
| - && (A)->port == (B)->port \ | ||
| - && ipv6_addr_equal(&((A)->addr),&((B)->addr)) \ | ||
| + && (A)->addr.port == (B)->addr.port \ | ||
| + && ipv6_addr_equal(&((A)->addr.addr),&((B)->addr.addr)) \ | ||
| && (A)->ifindex == (B)->ifindex) | ||
| #else /* WITH_CONTIKI */ | ||
|
|
||
| diff --git a/session.h b/session.h | ||
| index a8ac8f3..2ab600a 100644 | ||
| --- a/session.h | ||
| +++ b/session.h | ||
| @@ -35,8 +35,10 @@ typedef struct { | ||
| #include "net/ipv6/addr.h" | ||
| typedef struct { | ||
| unsigned char size; | ||
| - ipv6_addr_t addr; | ||
| - unsigned short port; | ||
| + struct { | ||
| + ipv6_addr_t addr; | ||
| + unsigned short port; | ||
| + } addr; | ||
| int ifindex; | ||
| } session_t; | ||
| #else /* ! WITH_CONTIKI && ! WITH_RIOT_GNRC */ | ||
| -- | ||
| 2.35.1 | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.