corrected data link receive of large packets that were reporting a actual PDU length but not loading the PDU.
This commit is contained in:
@@ -357,6 +357,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
|
||||
else
|
||||
pdu_len = 0;
|
||||
|
||||
|
||||
return pdu_len;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
// buffers used for receiving
|
||||
static uint8_t Rx_Buf[MAX_MPDU] = {0};
|
||||
|
||||
#ifdef BACDL_BIP
|
||||
static int get_local_ifr_ioctl(char *ifname, struct ifreq *ifr, int request)
|
||||
{
|
||||
int fd;
|
||||
@@ -106,12 +107,11 @@ static void Init_Network(char *ifname)
|
||||
/* setup local address */
|
||||
get_local_address_ioctl(ifname, &local_address, SIOCGIFADDR);
|
||||
decode_network_address(&local_address, &octet1, &octet2, &octet3, &octet4);
|
||||
#ifdef BACDL_BIP
|
||||
bip_set_address(octet1, octet2, octet3, octet4);
|
||||
#endif
|
||||
fprintf(stderr,"IP Address: %d.%d.%d.%d\n",
|
||||
(int)octet1, (int)octet2, (int)octet3, (int)octet4);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void Init_Device_Parameters(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user