diff options
author | Alexander Chernavin <achernavin@netgate.com> | 2023-10-03 12:45:51 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-12-01 19:26:58 +0000 |
commit | 9dc9136ec47459d5ce5e52e4b759b6a77fadde06 (patch) | |
tree | 45205dce1fe50f6fb768c6d34e31c89eea4b72a4 /src/plugins/flowprobe/node.c | |
parent | 74a7a5ae0853e670885988adb795a735fd7334e7 (diff) |
flowprobe: fix corrupted packets sent after feature disabling
When IPFIX flow record generation is enabled on an interface and the
active timer is set, flows will be saved and then exported according to
the active and passive timers. If then disable the feature on the
interface, the flow entries currently saved will remain in the state
tables. They will gradually expire and be exported. The problem is that
the template for them has already been removed. And they will be sent
with zero template ID which will make them unreadable.
A similar problem will occur if feature settings are "changed" on the
interface - i.e. disable the feature and re-enable it with different
settings (e.g. set a different datapath). The remaining flows that
correspond to the previous feature settings will be eventually sent
either with zero template ID or with template ID that corresponds to the
current feature settings on the interface (and look like garbage data).
With this fix, flush the current buffers before template removal and
clear the remaining flows of the interface during feature disabling.
Type: fix
Change-Id: I1e57db06adfdd3a02fed1a6a89b5418f85a35e16
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit f68afe85a6e4d5e00fdad1af19a76eb40fdfa388)
Diffstat (limited to 'src/plugins/flowprobe/node.c')
-rw-r--r-- | src/plugins/flowprobe/node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/flowprobe/node.c b/src/plugins/flowprobe/node.c index e9fa4b89665..44096d6245f 100644 --- a/src/plugins/flowprobe/node.c +++ b/src/plugins/flowprobe/node.c @@ -955,8 +955,7 @@ flowprobe_flush_callback_l2 (void) flush_record (FLOW_VARIANT_L2_IP6); } - -static void +void flowprobe_delete_by_index (u32 my_cpu_number, u32 poolindex) { flowprobe_main_t *fm = &flowprobe_main; |