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

UDP through NAT is not supported #5

Open
elsid opened this issue Jun 5, 2022 · 1 comment
Open

UDP through NAT is not supported #5

elsid opened this issue Jun 5, 2022 · 1 comment

Comments

@elsid
Copy link

elsid commented Jun 5, 2022

When a UDP packet is received, the server tries to lookup a peer that was added earlier. The problem is it was added for TCP connection but when the UDP packet goes through NAT the source port can change to any value. This happens because network routers handle TCP and UDP traffic independently. As a result, the carrier-pigeon server can't find the UDP peer in the Server::addr_cid and the traffic is rejected. Usually the problem appears when IPv4 is used and client and server are located in different networks.

@MitchellMarinoDev
Copy link
Owner

I see. I had not done extensive testing though a NAT, mostly all local network stuff. I am in the midst of a rework gutting tcp and implementing a reliable layer on top of udp. Since connection will then happen over udp, I will be using the udp source address which should be correct.

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

No branches or pull requests

2 participants