Skip to content

udp: restore correct address/port when parsing packet #6011

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

Merged
merged 14 commits into from
Apr 26, 2019

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Apr 24, 2019

Store IPaddresses/ports in another lwIP's pbuf next to and in sequence with the one holding actual data to guarantee coherence.

fix #5960

@d-a-v d-a-v added this to the 2.5.1 milestone Apr 24, 2019
- separate variable declaration from struct declaration
- cammelCase
- in-place constructor: avoid empty constructor then initialisation
- add in-place call to destructor

also improved pbuf usage
@d-a-v d-a-v requested a review from devyte April 25, 2019 00:55
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment + one question.
As discussed, please add the explanation about pbuf and the ALIGNER macro.
Is there consistency in ordering of the pbufs within the pbuf chain, considering multiple UdpContext instances that could be receiving different things?

// first rx_buf contains an address helper
...
// ... next one is effective data

@d-a-v d-a-v merged commit 5dd780c into esp8266:master Apr 26, 2019
@d-a-v d-a-v deleted the udpfix branch April 26, 2019 18:09
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.

WiFiUDP.remoteIP returns incorrect value in 2.5.0
3 participants