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 sockets don't bind to the right interface #67

Open
bemasc opened this issue Jun 10, 2015 · 4 comments
Open

UDP sockets don't bind to the right interface #67

bemasc opened this issue Jun 10, 2015 · 4 comments
Assignees
Labels

Comments

@bemasc
Copy link
Contributor

bemasc commented Jun 10, 2015

The freedom UDP socket API allows the caller to bind to a particular interface, identified by its IP address. Unfortunately, the Firefox implementation ignores this and effectively just binds to 0.0.0.0.

@trevj
Copy link
Contributor

trevj commented Jun 10, 2015

Some more info...

Here's the call to bind the socket:
https://github.com/freedomjs/freedom-for-firefox/blob/master/providers/core.udpsocket.js#L13

We should be able to use initWithAddress to specify a particular interface, although I wasn't able to quickly figure out how to pass a NetAddr argument:

@bemasc
Copy link
Contributor Author

bemasc commented Jun 29, 2015

Unfortunately, initWithAddress is marked [noscript], so we can't use it from JS. The best option I could see for now is to set the aLoopbackOnly argument to true if the user asks to bind to localhost.

I filed a mozilla bug to complain about this: https://bugzilla.mozilla.org/show_bug.cgi?id=1178427

@trevj
Copy link
Contributor

trevj commented Jun 29, 2015

That's unfortunate but thanks for following up on this!

Does this affect our ability to run holographic ICE on Firefox?

@bemasc
Copy link
Contributor Author

bemasc commented Jun 29, 2015

I suspect this will prevent us from doing IPv6 in Firefox. That's the only major issue I foresee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants