ETHER: Fix NAT dhcp behavior to properly respond to the MAC of the requestor
This commit is contained in:
parent
c5cd38afbf
commit
b35d36407d
1 changed files with 1 additions and 2 deletions
|
@ -170,6 +170,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||||
rbp = (struct bootp_t *)m->m_data;
|
rbp = (struct bootp_t *)m->m_data;
|
||||||
m->m_data += sizeof(struct udpiphdr);
|
m->m_data += sizeof(struct udpiphdr);
|
||||||
memset(rbp, 0, sizeof(struct bootp_t));
|
memset(rbp, 0, sizeof(struct bootp_t));
|
||||||
|
daddr.sin_addr.s_addr = 0xffffffffu;
|
||||||
|
|
||||||
if (dhcp_msg_type == DHCPDISCOVER) {
|
if (dhcp_msg_type == DHCPDISCOVER) {
|
||||||
if (preq_addr.s_addr != htonl(0L)) {
|
if (preq_addr.s_addr != htonl(0L)) {
|
||||||
|
@ -308,8 +309,6 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||||
}
|
}
|
||||||
*q = RFC1533_END;
|
*q = RFC1533_END;
|
||||||
|
|
||||||
daddr.sin_addr.s_addr = 0xffffffffu;
|
|
||||||
|
|
||||||
m->m_len = sizeof(struct bootp_t) -
|
m->m_len = sizeof(struct bootp_t) -
|
||||||
sizeof(struct ip) - sizeof(struct udphdr);
|
sizeof(struct ip) - sizeof(struct udphdr);
|
||||||
udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY);
|
udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY);
|
||||||
|
|
Loading…
Add table
Reference in a new issue