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

Disabling IPv6 (IDFGH-6137) #7816

Closed
fbucafusco opened this issue Nov 2, 2021 · 5 comments
Closed

Disabling IPv6 (IDFGH-6137) #7816

fbucafusco opened this issue Nov 2, 2021 · 5 comments
Labels
Resolution: Done Issue is done internally Status: Resolved Issue is done internally

Comments

@fbucafusco
Copy link

Problem Description

I tried to disable IPv6 support in lwip, and many compilations errors arose (most of them related with asio and coap modules, that are not enabled in menuconfig ).

I did it via menu config, so I imagined that it could be done, but it seems it needs some polish.

Here it says that could be disabled

ref1, ref2

I am using the ESPIDF platformio version that currently is the 4.3.0

Maybe I am doing something wrong.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 2, 2021
@github-actions github-actions bot changed the title Disabling IPv6 Disabling IPv6 (IDFGH-6137) Nov 2, 2021
@david-cermak
Copy link
Collaborator

@fbucafusco Could you tell us more about your project and the build system? You can start with the issue template, this will help us understand how you configure and build the project.
IPv4-only configuration is normally supported, but these two components (asio, coap) are excluded from the build, see the docs here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/performance/size.html#lwip-ipv6

@fbucafusco
Copy link
Author

fbucafusco commented Nov 3, 2021

Hi! My build system es PlatformIO, that eventually uses espidf build system somehow.
Sorry I didn't use the template cos I thought it would be something easy to see from the source.
Just to be sure I took an example from the repo examples\protocols\https_server\simple y configure it to compile almost with the default options (I removed the certificate validation from mbedtls component). When I was sure that it compiled, I went to the LWIP ip v6 option and I disabled it (CONFIG_LWIP_IPV6 not set). That macro is copied to LWIP_IPV6 definition, that controls the definition of this structure. Then, that structure is not declared anywhere and is used many times within many components, just to mention this place, but there are others.
The result is that the compilations drops many messages similar to "error: 'sockaddr_in6' does not name a type; did you mean ..."
Maybe I am doing something wrong, anyway

@david-cermak
Copy link
Collaborator

Thanks for your reply, I see that these components are not automatically excluded from the build on IDF v4.3.0. it seems the we forget to backport e305f29 to v4.3.

As a workaround, you can disable it manually, by adding this line to the project makefile

set(EXCLUDE_COMPONENTS "coap" "asio")

@fbucafusco
Copy link
Author

fbucafusco commented Nov 3, 2021

Thanks for the help!

However, from my point of view, just to excluding components from the build wouldn't be the best solution, since I could wanna use coap over ipv4 and not need ipv6. Unless there is anything in regard of the protocol or other aspect where what I am saying is dumb thing. Maybe is because the idf is using submodules to other repos source....

@espressif-bot espressif-bot added Status: In Progress Work is in progress Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new Status: In Progress Work is in progress labels Nov 10, 2021
espressif-bot pushed a commit that referenced this issue Nov 24, 2021
… coap

- Removes need to manually exclude these components as shown at
  #3781 (comment)

- Hide the config for these components if IPV6 is disabled

- The components are still included in the build, but with no source
  files

Backport of e305f29

Closes #7816
@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Resolved Issue is done internally and removed Status: Reviewing Issue is being reviewed labels Nov 25, 2021
@david-cermak
Copy link
Collaborator

This issue has been fixed in 9d72bdd

@fbucafusco Unfortunately the coap library (and our IDF port) doesn't support IPv4 only mode. If you need this, please create a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Resolved Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants