mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Don't throw away bootp reply packets that are shorter than our extended-length
bootp query packet. PR: 5512
This commit is contained in:
parent
3bc42d575a
commit
75d515b755
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32610
@ -559,7 +559,9 @@ await_reply(type, ival, ptr)
|
||||
bootpreply = (struct bootp_t *)&packet[ETHER_HDR_LEN];
|
||||
if ((type == AWAIT_BOOTP) &&
|
||||
(packetlen >= (ETHER_HDR_LEN +
|
||||
sizeof(struct bootp_t))) &&
|
||||
sizeof(struct iphdr) +
|
||||
sizeof(struct udphdr) +
|
||||
BOOTP_MIN_LEN)) &&
|
||||
(ntohs(udp->dest) == BOOTP_CLIENT) &&
|
||||
(bootpreply->bp_op == BOOTP_REPLY)) {
|
||||
convert_ipaddr(&arptable[ARP_CLIENT].ipaddr,
|
||||
|
@ -111,7 +111,9 @@ Author: Martin Renters
|
||||
#define RFC1048_SWAP_LEN 129 /* T129 */
|
||||
|
||||
#define RFC1048_END 255
|
||||
#define BOOTP_VENDOR_LEN 256
|
||||
#define BOOTP_VENDOR_LEN 256 /* Extended vendor field */
|
||||
|
||||
#define BOOTP_MIN_LEN 300 /* Minimum size of bootp udp packet */
|
||||
|
||||
#define TFTP_RRQ 1
|
||||
#define TFTP_WRQ 2
|
||||
|
Loading…
Reference in New Issue
Block a user