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

The encoding of IPv6 addresses for Peersharing is wrong. #4679

Closed
karknu opened this issue Sep 22, 2023 · 0 comments · Fixed by #4644
Closed

The encoding of IPv6 addresses for Peersharing is wrong. #4679

karknu opened this issue Sep 22, 2023 · 0 comments · Fixed by #4644
Assignees
Labels
peer-sharing Issues / PRs related to peer sharing

Comments

@karknu
Copy link
Contributor

karknu commented Sep 22, 2023

We shouldn’t be attempting to send the entire socket across the network. The only data that should be sent is the IPv6 address and the port number.

encodeRemoteAddress (SockAddrInet6 pn fi (w1, w2, w3, w4) si) = CBOR.encodeListLen 8
                                                <> CBOR.encodeWord 1
                                                <> CBOR.encodeWord32 w1
                                                <> CBOR.encodeWord32 w2
                                                <> CBOR.encodeWord32 w3
                                                <> CBOR.encodeWord32 w4
                                                <> CBOR.encodeWord32 fi <- This is a flow id and has no meaning at all for the other side
                                                <> CBOR.encodeWord32 si <- This could be a network interface id, such as eth0 also pointless
                                                <> encodePortNumber pn
@bolt12 bolt12 self-assigned this Sep 25, 2023
@bolt12 bolt12 added networking peer-sharing Issues / PRs related to peer sharing labels Sep 25, 2023
bolt12 added a commit that referenced this issue Sep 25, 2023
bolt12 added a commit that referenced this issue Sep 25, 2023
@bolt12 bolt12 linked a pull request Sep 25, 2023 that will close this issue
bolt12 added a commit that referenced this issue Sep 25, 2023
bolt12 added a commit that referenced this issue Sep 26, 2023
bolt12 added a commit that referenced this issue Oct 2, 2023
bolt12 added a commit that referenced this issue Oct 11, 2023
bolt12 added a commit that referenced this issue Oct 23, 2023
bolt12 added a commit that referenced this issue Oct 27, 2023
bolt12 added a commit that referenced this issue Oct 27, 2023
bolt12 added a commit that referenced this issue Oct 27, 2023
bolt12 added a commit that referenced this issue Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
peer-sharing Issues / PRs related to peer sharing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants