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

NAT-PMP will always timeout #32

Open
SilentBot1 opened this issue Jun 4, 2023 · 0 comments
Open

NAT-PMP will always timeout #32

SilentBot1 opened this issue Jun 4, 2023 · 0 comments

Comments

@SilentBot1
Copy link

SilentBot1 commented Jun 4, 2023

Hey,

Currently the NAT-PMP implementation of this library will never succeed when performing any actions due to a missing property when pushing the request to the _queue, which causes onMessage to always return early.

The op property is missing from the following _queue push:

this._queue.push({ buf: buf, cb: cb })

Which is causing this check:

if (parsed.op - SERVER_DELTA !== req.op) {

To always fail, as the parsed.op - SERVER_DELTA will never equal undefined.

From local testing, I can confirm this does add the mapping via NAT-PMP, but will never fully handle the response, causing the request to always timeout, falling back to NAT-UPNP, which may not be supported in all environments.

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

1 participant