Not showing a problem, behavior is as expected.
--- /dev/null
+Show that a broken TCP session is still correctly processed in the more liberal IDS mode.
+
+https://redmine.openinfosecfoundation.org/issues/4220
--- /dev/null
+alert smtp any any -> $SMTP_SERVERS any (msg:"inline-test"; flow:established; content:"|0D 0A 0D 0A|TV"; content:"AAAAAAAAAAAAAAAA"; within:200; classtype:bad-unknown; sid:1000009; rev:1;)
--- /dev/null
+checks:
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1000009
+ - filter:
+ count: 1
+ match:
+ event_type: flow
+ app_proto: smtp
--- /dev/null
+Show that a broken TCP session is correctly dropped.
+
+https://redmine.openinfosecfoundation.org/issues/4220
--- /dev/null
+alert smtp any any -> $SMTP_SERVERS any (msg:"inline-test"; flow:established; content:"|0D 0A 0D 0A|TV"; content:"AAAAAAAAAAAAAAAA"; within:200; classtype:bad-unknown; sid:1000009; rev:1;)
--- /dev/null
+pcap: ../issue-4220-01-ids/1flowB.pcap
+
+checks:
+ - filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 1000009
+ - filter:
+ count: 1
+ match:
+ stats.ips.accepted: 3
+ stats.ips.blocked: 1355
+ stats.ips.drop_reason.stream_error: 1355
+ stats.flow.end.tcp_state.syn_recv: 1
+ stats.flow.end.state.new: 1