Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get destination addres for UDP in nodejs

My server listens on a UDP port and also receives broadcast messages. Can I detect somehow if the received message was sent to my ip directly or to a broadcast address? rinfo just gives me the sender information

like image 481
soupdiver Avatar asked Feb 19 '14 18:02

soupdiver


1 Answers

It is currently not possible.

See this Github bug link

Workaround:

  • have different internal ports for the broadcast and the normal traffic.
  • Use iptables to redirect broadcast traffic to one of the internal port and the other traffic to the other port.
like image 178
leszek.hanusz Avatar answered Sep 21 '22 12:09

leszek.hanusz