2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Don't unicast to client if broadcast is requested

This commit is contained in:
Ted Lemon
1996-06-12 04:01:16 +00:00
parent d99452d1a0
commit 1a4b272feb
2 changed files with 10 additions and 6 deletions

View File

@@ -778,9 +778,11 @@ void ack_lease (packet, lease, offer, when)
return;
#endif
/* If it comes from a client who already knows its address,
sent it directly to that client. */
} else if (raw.ciaddr.s_addr && offer == DHCPACK) {
/* If it comes from a client who already knows its address and
is not requesting a broadcast response, sent it directly to
that client. */
} else if (raw.ciaddr.s_addr && offer == DHCPACK &&
!(raw.flags & BOOTP_BROADCAST)) {
to.sin_addr = packet -> raw -> ciaddr;
to.sin_port = htons (ntohs (server_port) + 1); /* XXX */