decode: remove pseudo packet checks

Bug 1107 checks/hacks should not longer be needed, so remove them.
pull/4531/head
Victor Julien 7 years ago
parent 272a5f526b
commit 7810f22413

@ -2887,10 +2887,7 @@ TmEcode DecodeAFP(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -612,10 +612,7 @@ DecodeErfDag(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -280,10 +280,7 @@ DecodeErfFile(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* Update counters. */ /* Update counters. */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -445,10 +445,7 @@ TmEcode DecodeIPFW(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -546,10 +546,7 @@ TmEcode NapatechDecode(ThreadVars *tv, Packet *p, void *data)
DecodeThreadVars *dtv = (DecodeThreadVars *) data; DecodeThreadVars *dtv = (DecodeThreadVars *) data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
// update counters // update counters
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -745,10 +745,7 @@ static TmEcode DecodeNetmap(ThreadVars *tv, Packet *p, void *data)
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
SCReturnInt(TM_ECODE_OK);
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -1231,10 +1231,7 @@ TmEcode DecodeNFQ(ThreadVars *tv, Packet *p, void *data)
IPV6Hdr *ip6h = (IPV6Hdr *)GET_PKT_DATA(p); IPV6Hdr *ip6h = (IPV6Hdr *)GET_PKT_DATA(p);
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (PKT_IS_PSEUDOPKT(p))
return TM_ECODE_OK;
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -394,10 +394,7 @@ static TmEcode DecodePcapFile(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -545,10 +545,7 @@ static TmEcode DecodePcap(ThreadVars *tv, Packet *p, void *data)
SCEnter(); SCEnter();
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -722,10 +722,7 @@ TmEcode DecodePfring(ThreadVars *tv, Packet *p, void *data)
{ {
DecodeThreadVars *dtv = (DecodeThreadVars *)data; DecodeThreadVars *dtv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug: https://redmine.openinfosecfoundation.org/issues/1107 */
if (p->flags & PKT_PSEUDO_STREAM_END)
return TM_ECODE_OK;
/* update counters */ /* update counters */
DecodeUpdatePacketCounters(tv, dtv, p); DecodeUpdatePacketCounters(tv, dtv, p);

@ -863,12 +863,7 @@ TmEcode DecodeWinDivert(ThreadVars *tv, Packet *p, void *data)
IPV6Hdr *ip6h = (IPV6Hdr *)GET_PKT_DATA(p); IPV6Hdr *ip6h = (IPV6Hdr *)GET_PKT_DATA(p);
DecodeThreadVars *d_tv = (DecodeThreadVars *)data; DecodeThreadVars *d_tv = (DecodeThreadVars *)data;
/* XXX HACK: flow timeout can call us for injected pseudo packets BUG_ON(PKT_IS_PSEUDOPKT(p));
* see bug:
* https://redmine.openinfosecfoundation.org/issues/1107
*/
if (PKT_IS_PSEUDOPKT(p))
SCReturnInt(TM_ECODE_OK);
DecodeUpdatePacketCounters(tv, d_tv, p); DecodeUpdatePacketCounters(tv, d_tv, p);

Loading…
Cancel
Save