diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-10 12:53:08 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-10 12:53:08 +0100 |
commit | 14a24ed02193ad9c9750e2953f4e3ef625e586bd (patch) | |
tree | 4fc7f8c74f09e72a1f0808f97e48be8823d2b378 | |
parent | f3acc95c926749eaefda4dfec49cad586125e80a (diff) | |
download | econ-14a24ed02193ad9c9750e2953f4e3ef625e586bd.tar.gz econ-14a24ed02193ad9c9750e2953f4e3ef625e586bd.tar.bz2 econ-14a24ed02193ad9c9750e2953f4e3ef625e586bd.zip |
econproxy: Keepalive may be an irregular command
-rw-r--r-- | econproxy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/econproxy.c b/econproxy.c index ea20f54..e3fd9b8 100644 --- a/econproxy.c +++ b/econproxy.c @@ -115,6 +115,12 @@ read_packet(struct ep *ep) return -1; } + /* Keepalive is an irregular if datasize > 0: + * the regular field recordCount is 1, + * without actually having one. */ + if (ep->ehdr.commandID == E_CMD_KEEPALIVE) + return 0; + if (ep->ecmd.recordCount > 0) { if (ep->ecmd.recordCount > 1) { fprintf(stderr, "read_packet: did not expect a" |