]> git.lizzy.rs Git - plan9front.git/commitdiff
tftpd: apply sstallion's tftpd-rfc patch (from sources)
authorcinap_lenrek <cinap_lenrek@gmx.de>
Tue, 18 Sep 2012 16:27:59 +0000 (18:27 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Tue, 18 Sep 2012 16:27:59 +0000 (18:27 +0200)
tftpd option handling is not RFC-compliant. This causes picky
clients (such as curl) to fail transfers.

sys/src/cmd/ip/tftpd.c

index c39f2173dcbf953af2701f183e6f90ae5d89ae60..9b543a29e51babdc9a74c4a3d3e5579bbccbce6a 100644 (file)
@@ -342,9 +342,6 @@ options(int fd, char *buf, int bufsz, char *file, ushort oper, char *p, int dlen
 
        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",