Added BACNET_IP_BROADCAST_USE_INADDR_ANY ifdef option for router port binding. (#953)
This commit is contained in:
@@ -176,9 +176,11 @@ bool dl_ip_init(ROUTER_PORT *port, IP_DATA *ip_data)
|
||||
|
||||
/* bind the socket to the local port number */
|
||||
sin.sin_family = AF_INET;
|
||||
/* sin.sin_addr.s_addr, ip_data->local_addr.s_addr;// =
|
||||
* htonl(INADDR_ANY); */
|
||||
#if defined(BACNET_IP_BROADCAST_USE_INADDR_ANY)
|
||||
sin.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
#else
|
||||
sin.sin_addr.s_addr = ip_data->local_addr.s_addr;
|
||||
#endif
|
||||
sin.sin_port = ip_data->port;
|
||||
|
||||
status = bind(
|
||||
|
||||
Reference in New Issue
Block a user