From: Oliver Grawert <ogra@ubuntu.com>
Date: Fri, 24 Nov 2023 02:45:58 +0100
Subject: Revert the need of the next-server option

So it points to the own IP again for tftp if the option
is not set (patch by Oliver Grawert; disputed upstream).
---
 server/dhcp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/dhcp.c b/server/dhcp.c
index 0b261c2..e1fdba7 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -1615,6 +1615,7 @@ void dhcpinform (packet, ms_nulltp)
 	log_info ("%s", msgbuf);
 
 	/* Figure out the address of the boot file server. */
+	raw.siaddr = from;
 	if ((oc =
 	     lookup_option (&server_universe, options, SV_NEXT_SERVER))) {
 		if (evaluate_option_cache (&d1, packet, (struct lease *)0,
@@ -3405,7 +3406,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
 	}
 
 	/* Figure out the address of the boot file server. */
-	memset (&state -> siaddr, 0, sizeof state -> siaddr);
+	memcpy (&state -> siaddr, state -> from.iabuf, sizeof state -> siaddr);
 	if ((oc =
 	     lookup_option (&server_universe,
 			    state -> options, SV_NEXT_SERVER))) {
