Skip to content
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

fixes #1496 Provide NNG_ENABLE_IPV6 option (disabled by default) #1787

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Feb 26, 2024

This also checks if the build system has the definitions for AF_INET6, which might help in some embedded IPv4 only settings.

The resolver test is enhanced to include a check for IPv6 enabled in the kernel.

IPv6 support is enabled by default, of course.

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 97.72727% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 79.12%. Comparing base (8e62028) to head (a34a07d).

Files Patch % Lines
src/platform/posix/posix_sockaddr.c 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1787      +/-   ##
==========================================
- Coverage   79.28%   79.12%   -0.17%     
==========================================
  Files          94       94              
  Lines       21077    21078       +1     
==========================================
- Hits        16711    16677      -34     
- Misses       4366     4401      +35     

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

Comment on lines +209 to +235
// When we refactor this test suite for NUTS, reenable this
// test. test. #ifdef NNG_ENABLE_IPV6 Convey("Sending
// to an IPv6 address on IPv4 fails", {
// nng_aio *aio1; char *msg = "nope";
// nng_sockaddr sa; int rv;
// nng_iov iov;
//
// sa.s_in6.sa_family = NNG_AF_INET6;
// // address is for google.com
// inet_ntop(AF_INET6,
// "2607:f8b0:4007:804::200e", (void *)
// sa.s_in6.sa_addr, 16); sa.s_in6.sa_port = 80;
// So(nng_aio_alloc(&aio1, NULL, NULL) ==
// 0); iov.iov_buf = msg;
// iov.iov_len = strlen(msg) + 1;
// So(nng_aio_set_iov(aio1, 1, &iov) == 0);
// nng_aio_set_input(aio1, 0, &sa);
//
// nni_plat_udp_send(u1, aio1);
// nng_aio_wait(aio1);
// So((rv = nng_aio_result(aio1)) != 0);
// So(rv == NNG_EADDRINVAL || rv ==
// NNG_ENOTSUP || rv ==
// NNG_EUNREACHABLE || rv == NNG_EINVAL);
// nng_aio_free(aio1);
// });
// #endif

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
This also checks if the build system has the definitions for AF_INET6, which might
help in some embedded IPv4 only settings.

The resolver test is enhanced to include a check for IPv6 enabled in the kernel.

IPv6 support is enabled by default, of course.
@gdamore gdamore merged commit a34a07d into master Feb 26, 2024
17 of 18 checks passed
@gdamore gdamore deleted the gdamore/noip6 branch February 26, 2024 02:57
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.

1 participant