Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
d-a-v merged 2 commits intoesp8266:masterfromnomis:udp-ipv6-linklocal-fix
Apr 11, 2020

Conversation

@nomis
Copy link
Contributor

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.

@d-a-v
Copy link
Collaborator

Thanks !
What about a comment with your explanation ?
Did you try to simply calludp_connect() instead ?

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.
@nomis
Copy link
ContributorAuthor

I've just tried usingudp_connect() and lwIP isn't selecting the zone for a link local address because it tries to route to it and no source address has been provided... so it looks like TCP to link-local address won't currently work either.

@d-a-v
Copy link
Collaborator

d-a-v commentedSep 20, 2019
edited
Loading

I had been testing TCP withfe80: and I remember it worked. Did you try ?

edit: didn't work after dedicated test (I might have tried the other way around)

@nomis
Copy link
ContributorAuthor

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
Copy link
Collaborator

No, I've not tested TCP at all. Did you set or bind a source address explicitly?

No.
I'd have to retry testing. You can too: take any tcp/http client example and change the address to your link-local IPv6 server address.

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%intfname likefe80::%eth0.

@devyte
Copy link
Collaborator

What is the status here?

@devyte
Copy link
Collaborator

@nomis ping

@devytedevyte added this to the2.7.0 milestoneNov 20, 2019
Copy link
Collaborator

@d-a-vd-a-v left a 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
Copy link
Collaborator

This change is also necessary for TCP (credit will be given).
Merging for UDP.

@d-a-vd-a-v merged commitee619d3 intoesp8266:masterApr 11, 2020
d-a-v added a commit to d-a-v/Arduino that referenced this pull requestApr 11, 2020
d-a-v added a commit that referenced this pull requestApr 11, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@d-a-vd-a-vd-a-v approved these changes

Assignees

@d-a-vd-a-v

Labels

None yet

Projects

None yet

Milestone

2.7.0

Development

Successfully merging this pull request may close these issues.

3 participants

@nomis@d-a-v@devyte

[8]ページ先頭

©2009-2025 Movatter.jp