summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-07-11 02:35:49 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-07-11 02:35:49 +0200
commit1d5a2aa48778960fc9b5ab0b39f83a5322c3f754 (patch)
tree7018a4f9a2e38b5889710c883ab96ba7e83c455a /sys/src/cmd/ip
parent0f5f226ba1ccbc3b134c77a33503ad2182c05e5a (diff)
tftpd: count only options we understand so we wont send empty oack message
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/tftpd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/tftpd.c b/sys/src/cmd/ip/tftpd.c
index 7a6ec6f77..e0569b959 100644
--- a/sys/src/cmd/ip/tftpd.c
+++ b/sys/src/cmd/ip/tftpd.c
@@ -301,12 +301,13 @@ options(int fd, char *buf, int bufsz, char *file, ushort oper, char *p, int dlen
break;
dlen -= vallen;
- nopts++;
olen = 0;
op = handleopt(fd, p, val);
if (op == nil)
continue;
+ nopts++;
+
/* append OACK response to buf */
nmlen = emits(p, bp, ep); /* option name */
if (nmlen < 0)