git: 9front

Download patch

ref: 948ef06dffca18e44750393ec85ff9b471238905
parent: d6c040cd74e1ec8c18df62508571040675c5950f
author: cinap_lenrek <cinap_lenrek@gmx.de>
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",
--