STM32 Ethernet... initial bring-up changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4165 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
a8628e9397
commit
077b3188f9
@ -256,10 +256,19 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary)
|
|||||||
|
|
||||||
/* Parse the incoming DATA packet */
|
/* Parse the incoming DATA packet */
|
||||||
|
|
||||||
if (nbytesrecvd < TFTP_DATAHEADERSIZE ||
|
if (nbytesrecvd < TFTP_DATAHEADERSIZE)
|
||||||
tftp_parsedatapacket(packet, &opcode, &rblockno) != OK ||
|
{
|
||||||
|
/* Packet is not big enough to be parsed */
|
||||||
|
|
||||||
|
nvdbg("Tiny data packet ignored\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tftp_parsedatapacket(packet, &opcode, &rblockno) != OK ||
|
||||||
blockno != rblockno)
|
blockno != rblockno)
|
||||||
{
|
{
|
||||||
|
/* Opcode is not TFTP_DATA or the block number is unexpected */
|
||||||
|
|
||||||
nvdbg("Parse failure\n");
|
nvdbg("Parse failure\n");
|
||||||
if (opcode > TFTP_MAXRFC1350)
|
if (opcode > TFTP_MAXRFC1350)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user