summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-10 12:53:08 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-10 12:53:08 +0100
commit14a24ed02193ad9c9750e2953f4e3ef625e586bd (patch)
tree4fc7f8c74f09e72a1f0808f97e48be8823d2b378
parentf3acc95c926749eaefda4dfec49cad586125e80a (diff)
downloadecon-14a24ed02193ad9c9750e2953f4e3ef625e586bd.tar.gz
econ-14a24ed02193ad9c9750e2953f4e3ef625e586bd.tar.bz2
econ-14a24ed02193ad9c9750e2953f4e3ef625e586bd.zip
econproxy: Keepalive may be an irregular command
-rw-r--r--econproxy.c6
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"