On Sun, Dec 07, 2025 at 02:58:48PM +0100, Chris Hofstaedtler wrote:
> > tftp-hpa version 5.2+20240610-3 works fine.
> > 
> > Attached is a pcap file captured from version 5.2+20240610-3 that
> > works and a file from version  5.3+20251116-1 where it does not
> > work.
> 
> Please send this to upstream, either using the mailing list at
> https://lists.zytor.com/syslinux or directly to H. Peter Anvin
> <[email protected]>.

Did so. Also this reply ;-)
> 
> Downstrean in Debian I cannot offer you any help with debugging or fixing
> this.

After staring at pcaps for a while and comparing bits, I ended
up at commit 340d4b66512ae57a44e28bdcf15b1c051c3d35e0 that
introduced this regression.

From looking at it, I would guess that it affects all situations
where a tftp client requests a non-existant file in the normal
course of requests, i.e. it not only affects rspberries.

Please consider including the attached patch.

Bye,

Joerg


diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
index e2a52ad..b8ba8a4 100644
--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -1910,6 +1910,7 @@ static void nak(int error, const char *msg)
         msg = "Request failed";
 
     tp = (struct tftphdr *)buf;
+    tp->th_opcode = htons((u_short) ERROR);
     tp->th_code = htons((u_short) error);
 
     length = strlen(msg) + 1;

Attachment: signature.asc
Description: PGP signature

Reply via email to