corrected data link receive of large packets that were reporting a actual PDU length but not loading the PDU.
This commit is contained in:
@@ -284,6 +284,8 @@ uint16_t bip_receive(
|
||||
pdu_len -= 4; /* BVLC header */
|
||||
if (pdu_len < max_pdu)
|
||||
memmove(&pdu[0],&buf[4],pdu_len);
|
||||
// ignore packets that are too large
|
||||
// clients should check my max-apdu first
|
||||
else
|
||||
pdu_len = 0;
|
||||
}
|
||||
|
||||
@@ -257,6 +257,10 @@ uint16_t ethernet_receive(
|
||||
// copy the buffer into the PDU
|
||||
if (pdu_len < max_pdu)
|
||||
memmove(&pdu[0],&buf[17],pdu_len);
|
||||
// ignore packets that are too large
|
||||
// client should check my max apdu first
|
||||
else
|
||||
pdu_len = 0;
|
||||
|
||||
return pdu_len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user