fix BACnet/IP on OS to bind broadcast to specific port (#489)
* Fixes #346 by binding the broadcast socket to the port specific broadcast address rather than INADDR_ANY or INADDR_BROADCAST. Added additional compile and environment options for those who might need them. * Changed the define USE_CLASSADDR to BACNET_IP_BROADCAST_USE_CLASSADDR to help manage namespaces. * Added BACNET_IP_BROADCAST_BIND_ADDR environment variable to override the default broadcast binding address. --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -44,10 +44,6 @@
|
||||
|
||||
/* optional configuration for BACnet/IP datalink layer */
|
||||
#if (defined(BACDL_BIP) || defined(BACDL_ALL))
|
||||
/* other BIP defines (define as 1 to enable):
|
||||
USE_INADDR - uses INADDR_BROADCAST for broadcast and binds using INADDR_ANY
|
||||
USE_CLASSADDR = uses IN_CLASSx_HOST where x=A,B,C or D for broadcast
|
||||
*/
|
||||
#if !defined(BBMD_ENABLED)
|
||||
#define BBMD_ENABLED 1
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user