- Notifications
You must be signed in to change notification settings - Fork13.3k
Fix UDP send to IPv6 link local addresses#6541
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
d-a-v commentedSep 20, 2019
Thanks ! |
lwIP's tcp/udp_connect() and tcp/udp_bind() functions automaticallyset the zone if it is required but missing, but udp_connect() is notused so this doesn't happen.Explicitly set the zone to the default network interface if it isrequired for the type of address being used. Otherwise there is nozone set and packets to a link local destination don't go anywhere.
adec19d to3aeb851Comparenomis commentedSep 20, 2019
I've just tried using |
d-a-v commentedSep 20, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I had been testing TCP with edit: didn't work after dedicated test (I might have tried the other way around) |
nomis commentedSep 20, 2019
No, I've not tested TCP at all. Did you set or bind a source address explicitly? If it works without specifying a source address then it would be reasonable to apply this fix so that UDP works too. |
d-a-v commentedSep 20, 2019
No. I assume this issue would exist only for client not server, but it can also be tried with server examples. Under linux, link-local server addresses must be extended with |
devyte commentedNov 8, 2019
What is the status here? |
devyte commentedNov 20, 2019
@nomis ping |
d-a-v left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Without this change, IPv6 UDP packets tofe80:: do not leave esp(Udp.endPacket() == 0).
With this change, I can see them withtcpdump on my router.
d-a-v commentedApr 11, 2020
This change is also necessary for TCP (credit will be given). |
lwIP's tcp/udp_connect() and tcp/udp_bind() functions automatically
set the zone if it is required but missing, but udp_connect() is not
used so this doesn't happen.
Explicitly set the zone to the default network interface if it is
required for the type of address being used. Otherwise there is no
zone set and packets to a link local destination don't go anywhere.