Corrected BACnet/IP received to ignore packets from itself.

This commit is contained in:
skarg
2007-06-01 15:59:09 +00:00
parent 98e2469937
commit dd0d60b856
+1 -1
View File
@@ -214,7 +214,7 @@ uint16_t bip_receive(BACNET_ADDRESS * src, /* source address */
if ((buf[1] == BVLC_ORIGINAL_UNICAST_NPDU) || if ((buf[1] == BVLC_ORIGINAL_UNICAST_NPDU) ||
(buf[1] == BVLC_ORIGINAL_BROADCAST_NPDU)) { (buf[1] == BVLC_ORIGINAL_BROADCAST_NPDU)) {
/* ignore messages from me */ /* ignore messages from me */
if (sin.sin_addr.s_addr == BIP_Address.s_addr) if (sin.sin_addr.s_addr == htonl(BIP_Address.s_addr))
pdu_len = 0; pdu_len = 0;
else { else {
/* copy the source address /* copy the source address