Skip to content

fix(edge_utils): update memcpy to use n3n_sock_t for destination#127

Merged
hamishcoleman merged 1 commit into
n42n:mainfrom
SerinaNya:patch-4
Apr 23, 2026
Merged

fix(edge_utils): update memcpy to use n3n_sock_t for destination#127
hamishcoleman merged 1 commit into
n42n:mainfrom
SerinaNya:patch-4

Conversation

@SerinaNya

Copy link
Copy Markdown
Contributor

When processing IPv6 addresses, using the smaller sizeof(struct sockaddr_in) causes the last 4 bytes of data to be truncated or retain old values.

This fix ensures the complete n3n_sock_t structure is copied correctly, resolving the IPv6 address truncation issue, which is mentioned in #21 (comment).

✅ I have already tested this change, it works properly.

@codecov

codecov Bot commented Apr 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.86%. Comparing base (befa0be) to head (156e3d7).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/edge_utils.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   48.87%   48.86%   -0.01%     
==========================================
  Files          54       54              
  Lines       10570    10570              
==========================================
- Hits         5166     5165       -1     
- Misses       5404     5405       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hamishcoleman hamishcoleman merged commit c16bcd6 into n42n:main Apr 23, 2026
31 of 33 checks passed
@hamishcoleman

Copy link
Copy Markdown
Contributor

Thanks!

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