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

examples/mesh/ip_internal_network: Use of 'if_desc' to distinguish between esp_netif configurations (IDFGH-13312) #14237

Closed
3 tasks done
vjgriswold opened this issue Jul 23, 2024 · 5 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@vjgriswold
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

In mesh_netif.c, the logic within several functions distinguishes between different configurations of netif_sta through comparison of its if_desc property. This property can only be set, however, through the esp_netif_config_t structure at the time of calling esp_netif_new(), and is immutable afterwards.

If one is to create a valid driver control block for the Mesh netif, though, one does not have access to if_desc through public APIs until after esp_netif_new() has already been called within the ESP-WIFI-MESH library routines.

Either the logic within mesh_netif.c must be updated to not distinguish netif_sta via if_desc, or the corresponding Mesh library routines must be publicly-accessible, as they are today with WiFi.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 23, 2024
@github-actions github-actions bot changed the title examples/mesh/ip_internal_network: Use of 'if_desc' to distinguish between esp_netif configurations examples/mesh/ip_internal_network: Use of 'if_desc' to distinguish between esp_netif configurations (IDFGH-13312) Jul 23, 2024
@zhangyanjiaoesp
Copy link
Collaborator

@vjgriswold Thanks for report, we will check it ASAP.

@zhangyanjiaoesp
Copy link
Collaborator

@vjgriswold I don't think there is an issue with the netif operation in the example.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed Awaiting Response awaiting a response from the author and removed Status: Opened Issue is new labels Aug 23, 2024
@vjgriswold
Copy link
Author

The use of if_desc in this example is valid only if a correct device control block can be created at the same time. Given that the layout of the Mesh device control block is opaque, that is not possible. Thus, there is insufficient visibility into the prerequisite data structures to use if_desc for this purpose.

@espressif-bot espressif-bot removed the Awaiting Response awaiting a response from the author label Sep 5, 2024
@zhangyanjiaoesp
Copy link
Collaborator

@vjgriswold
The mesh_netif.c is only used in the ip_internal_network, the underlying logic is still based on the WiFi netif, the example only modifies some driver functions.

@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, will close due to inactivity, feel free to reopen with more updates.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Reviewing Issue is being reviewed labels Jan 7, 2025
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: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants