tftpd: count only options we understand so we wont send empty oack message
This commit is contained in:
parent
0f5f226ba1
commit
1d5a2aa487
1 changed files with 2 additions and 1 deletions
|
@ -301,12 +301,13 @@ options(int fd, char *buf, int bufsz, char *file, ushort oper, char *p, int dlen
|
||||||
break;
|
break;
|
||||||
dlen -= vallen;
|
dlen -= vallen;
|
||||||
|
|
||||||
nopts++;
|
|
||||||
olen = 0;
|
olen = 0;
|
||||||
op = handleopt(fd, p, val);
|
op = handleopt(fd, p, val);
|
||||||
if (op == nil)
|
if (op == nil)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
nopts++;
|
||||||
|
|
||||||
/* append OACK response to buf */
|
/* append OACK response to buf */
|
||||||
nmlen = emits(p, bp, ep); /* option name */
|
nmlen = emits(p, bp, ep); /* option name */
|
||||||
if (nmlen < 0)
|
if (nmlen < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue