Project

General

Profile

Optimization #4427

storage api: use dedicated 'id' type

Added by Victor Julien 2 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Target version:
Effort:
Difficulty:
Label:

Description

The various wrappers of the storage API all use the same int type for their id's. This means the compiler can't know if we use the wrong id in the wrong wrapper, which has lead to at least one bug (#4348/#4424).

To avoid this in the future we should change the id type to wrapper specific struct that embeds the int. This way the compiler can enforce this for us.

There are 4 such wrappers: flow, ippair, host and device.

The flow has been done in: https://github.com/OISF/suricata/commit/bc667a4a939c887bc298bbb865eda4338f8cea2f

#1

Updated by Juliana Fajardini Reichow 2 months ago

Hi, can I claim this task? Thanks!

#2

Updated by Juliana Fajardini Reichow 2 months ago

  • Assignee set to Juliana Fajardini Reichow

Claiming this, as authorized by Victor Julien.

#3

Updated by Juliana Fajardini Reichow 2 months ago

  • Status changed from New to Closed

Also available in: Atom PDF