Fix TFTP code
This commit is contained in:
parent
8cab20c17e
commit
39b0033325
1 changed files with 1 additions and 1 deletions
2
tftp.c
2
tftp.c
|
@ -150,7 +150,7 @@ static ssize_t tftp_recvfrom(int sock, char *pkt, uint16_t* port,
|
|||
*/
|
||||
fprintf(stderr, "Error: %.32s\n", pkt);
|
||||
return -3;
|
||||
} else {
|
||||
} else if (!opcode || opcode > ERR) {
|
||||
fprintf(stderr, "Received invalid packet: ");
|
||||
pkt_print(pkt, stderr);
|
||||
fprintf(stderr, ".\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue