From 14a24ed02193ad9c9750e2953f4e3ef625e586bd Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 10 Mar 2013 12:53:08 +0100 Subject: econproxy: Keepalive may be an irregular command --- econproxy.c | 6 ++++++ 1 file changed, 6 insertions(+) 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" -- cgit