shithub: riscv

Download patch

ref: 913afc39c9b4750e630c7f4ff3161a37602b006b
parent: a5756259cf994e08b7bbac2a9591adab02f63d2b
author: cinap_lenrek <[email protected]>
date: Tue Sep 18 14:27:59 EDT 2012

tftpd: apply sstallion's tftpd-rfc patch (from sources)

tftpd option handling is not RFC-compliant. This causes picky
clients (such as curl) to fail transfers.

--- a/sys/src/cmd/ip/tftpd.c
+++ b/sys/src/cmd/ip/tftpd.c
@@ -342,9 +342,6 @@
 
 	if (bp + 3 >= ep)
 		return -1;
-	*bp++ = '\0';
-	*bp++ = '\0';			/* overkill */
-	*bp++ = '\0';
 
 	if (write(fd, buf, bp - buf) < bp - buf) {
 		syslog(dbg, flog, "tftpd network write error on oack to %s: %r",