From: Victor Julien Date: Thu, 12 Dec 2019 14:57:29 +0000 (+0100) Subject: decode/tcp: accept TCP fast open cookie request X-Git-Tag: suricata-5.0.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df74f34a6287097ee62af392aa13c831326a8dbb;p=thirdparty%2Fsuricata.git decode/tcp: accept TCP fast open cookie request --- diff --git a/src/decode-tcp.c b/src/decode-tcp.c index 0d464bbe7b..e3824d3351 100644 --- a/src/decode-tcp.c +++ b/src/decode-tcp.c @@ -154,9 +154,10 @@ static void DecodeTCPOptions(Packet *p, const uint8_t *pkt, uint16_t pktlen) break; case TCP_OPT_TFO: SCLogDebug("TFO option, len %u", olen); - if (olen < TCP_OPT_TFO_MIN_LEN || + if ((olen != 2) && + (olen < TCP_OPT_TFO_MIN_LEN || olen > TCP_OPT_TFO_MAX_LEN || - !((olen - 2) % 8 == 0)) + !((olen - 2) % 8 == 0))) { ENGINE_SET_EVENT(p,TCP_OPT_INVALID_LEN); } else {