Removed fix for Revision 2094, as this broke the ability to bind to MAC addresses, and the NPDU is the source for the SNET in the address.
This commit is contained in:
+4
-14
@@ -295,20 +295,10 @@ uint16_t bip_receive(
|
||||
fprintf(stderr, "BIP: src is me. Discarded!\n");
|
||||
#endif
|
||||
} else {
|
||||
/* If this was an Original_Broadcast, ensure that
|
||||
* the response gets bcast back by this:
|
||||
*/
|
||||
if (pdu[1] == BVLC_ORIGINAL_BROADCAST_NPDU) {
|
||||
src->net = BACNET_BROADCAST_NETWORK;
|
||||
src->mac_len = 0;
|
||||
} else {
|
||||
src->net = 0;
|
||||
/* data in src->mac[] is in network format */
|
||||
src->mac_len = 6;
|
||||
memcpy(&src->mac[0], &sin.sin_addr.s_addr, 4);
|
||||
memcpy(&src->mac[4], &sin.sin_port, 2);
|
||||
}
|
||||
|
||||
/* data in src->mac[] is in network format */
|
||||
src->mac_len = 6;
|
||||
memcpy(&src->mac[0], &sin.sin_addr.s_addr, 4);
|
||||
memcpy(&src->mac[4], &sin.sin_port, 2);
|
||||
/* FIXME: check destination address */
|
||||
/* see if it is broadcast or for us */
|
||||
/* decode the length of the PDU - length is inclusive of BVLC */
|
||||
|
||||
Reference in New Issue
Block a user