Menu

#8 Broadcast addresses do not work

open
5
2015-03-17
2003-08-28
No

Network broadcast addresses do not work,

for UDP you need to set SO_BROADCAST option on sockets.
This is also a bug in original netcat.

for TCP I don't know if this is possible, but wouldn't
it be way cool.

Discussion

  • Giovanni Giacobbi

    Logged In: YES
    user_id=361125

    This is something I heard before, but i'm not that sure
    about it. I will investigate on this.

    Thanks.

     
  • Giovanni Giacobbi

    • assigned_to: nobody --> themnemonic
     
  • Nathan Catlow

    Nathan Catlow - 2003-08-29

    Logged In: YES
    user_id=55858

    After a bit more investigation I do not think TCP broadcasts
    are going to be possible through standard socket calls, it
    *may* be related to
    http://www.securityfocus.com/archive/1/262733. I'm fairly
    sure it used to be possible (but i have been known to be
    wrong on more than one occasion :).

    for UDP however, I added the SO_BROADCAST option in
    network.c line 372 and this works but exhibited the same UDP
    type bug as seen before (although that bug is now fixed,
    thankyou). Two seperate machines this time:

    $ ./netcat -vv -l -u -p 2000 10.254.254.255
    hello

    $ ./netcat -vv -u 10.254.254.255 2000
    hello
    there
    no more data getting through

    I hope this helps?

     
  • Nobody/Anonymous

    Logged In: NO

    Ok, it traps well the first brodcast msg, but hen it doesn't
    trap the next ones !

    hope it helps...

     
  • Holger Jakobs

    Holger Jakobs - 2015-03-17

    So after more than 10 years the bug is still there.

    Luckily, with socat testing of UDP broadcasts works fine.

     

Log in to post a comment.