Skip to content

UDP socket bind to specific IP does not receive broadcast on Linux #576

Closed

Description

@CodeMason

Unless you have root, it's not possible. It took me a while to figure this out...

More: http://developerweb.net/viewtopic.php?id=5722

Maybe if the "SO_BROADCAST" is true, and there is a specified localAddress, then throw an exception in linux? This is not an issue in windows.

Thoughts?

Activity

  1. added a commit that references this issue on Aug 30, 2012
  2. trustin commented on Aug 30, 2012

    @trustin
    Member

    I inserted some check to detect the case you mentioned. However, I did not raise an exception but just logged a warning message, which should be probably enough.

  3. trustin commented on Aug 30, 2012

    @trustin
    Member

    The example message:

    Aug 30, 2012 3:54:11 PM io.netty.channel.AbstractChannel
    WARNING: A non-root user can't receive a broadcast packet if the socket is not bound to a wildcard address; binding to a non-wildcard address (/127.0.0.1:8080) anyway as requested.

  4. ghost assigned on Aug 30, 2012
  5. CodeMason commented on Aug 30, 2012

    @CodeMason
    Author

    Excellent! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions