Skip to content

Conversation

@zephyrbot
Copy link

@zephyrbot zephyrbot commented Oct 1, 2024

Backport b24c520 from #77376.

Fixes #77188

This commit addresses an issue in net_context_bind() where unaligned
memory access was not properly handled when checking for INADDR_ANY.
The problem primarily affected MCUs like ARMv6 that don't support
unaligned memory access.

- Use UNALIGNED_GET() to safely access the sin_addr.s_addr field
- Ensures correct behavior on architectures with alignment restrictions

This fix improves compatibility and prevents potential crashes or
unexpected behavior on affected platforms.

Signed-off-by: Daekeun Kang <dkkang@huconn.com>
(cherry picked from commit b24c520)
@zephyrbot zephyrbot added Backport Backport PR and backport failure issues Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. area: Networking labels Oct 1, 2024
@henrikbrixandersen henrikbrixandersen merged commit 6937dab into v3.6-branch Oct 2, 2024
@henrikbrixandersen henrikbrixandersen deleted the backport-77376-to-v3.6-branch branch October 2, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking Backport Backport PR and backport failure issues Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants