From 6ec9d81345a637d21e1b65bde98b5bdb806180fc Mon Sep 17 00:00:00 2001 From: Peter Haag Date: Fri, 16 Aug 2024 19:52:32 +0200 Subject: [PATCH] Test if node is fragement node in defragment code. Fix #555 --- src/nfpcapd/pcaproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nfpcapd/pcaproc.c b/src/nfpcapd/pcaproc.c index 799a5092..77bb14df 100644 --- a/src/nfpcapd/pcaproc.c +++ b/src/nfpcapd/pcaproc.c @@ -336,8 +336,9 @@ static inline struct FlowNode *ProcessIPfrag(packetParam_t *packetParam, const s FindNode.flowKey.dst_port = 0; Node = Lookup_Node(&FindNode); - if (!Node) { + if (!Node || Node->nodeType != FRAG_NODE) { dbg_printf("IP fragment: initial node missing! Skip!\n"); + packetParam->proc_stat.skipped++; return NULL; }