alert pkthdr any any -> any any (msg:"SURICATA TCP duplicated option"; decode-event:tcp.opt_duplicate; classtype:protocol-command-decode; sid:2200037; rev:2;)
alert pkthdr any any -> any any (msg:"SURICATA UDP packet too small"; decode-event:udp.pkt_too_small; classtype:protocol-command-decode; sid:2200038; rev:2;)
alert pkthdr any any -> any any (msg:"SURICATA UDP header length too small"; decode-event:udp.hlen_too_small; classtype:protocol-command-decode; sid:2200039; rev:2;)
-alert pkthdr any any -> any any (msg:"SURICATA UDP invalid header length"; decode-event:udp.hlen_invalid; classtype:protocol-command-decode; sid:2200040; rev:2;)
alert pkthdr any any -> any any (msg:"SURICATA SLL packet too small"; decode-event:sll.pkt_too_small; classtype:protocol-command-decode; sid:2200041; rev:2;)
alert pkthdr any any -> any any (msg:"SURICATA Ethernet packet too small"; decode-event:ethernet.pkt_too_small; classtype:protocol-command-decode; sid:2200042; rev:2;)
alert pkthdr any any -> any any (msg:"SURICATA PPP packet too small"; decode-event:ppp.pkt_too_small; classtype:protocol-command-decode; sid:2200043; rev:2;)
return -1;
}
- if (unlikely(len != UDP_GET_LEN(p))) {
- ENGINE_SET_INVALID_EVENT(p, UDP_HLEN_INVALID);
- return -1;
- }
-
SET_UDP_SRC_PORT(p,&p->sp);
SET_UDP_DST_PORT(p,&p->dp);
SCReturnInt(0);
}
+static bool OutdatedEvent(const char *raw)
+{
+ if (strcmp(raw, "decoder.udp.hlen_invalid") == 0) {
+ return true;
+ }
+ return false;
+}
+
/**
* \brief This function is used to parse decoder events options passed via decode-event: keyword
*
if (de->event == STREAM_REASSEMBLY_OVERLAP_DIFFERENT_DATA) {
StreamTcpReassembleConfigEnableOverlapCheck();
}
+
+ if (OutdatedEvent(rawstr)) {
+ if (SigMatchStrictEnabled(DETECT_DECODE_EVENT)) {
+ SCLogError("decode-event keyword no longer supports event \"%s\"", rawstr);
+ goto error;
+ } else {
+ SCLogWarning("decode-event keyword no longer supports event \"%s\"", rawstr);
+ }
+ }
+
return de;
error: