Project

General

Profile

Actions

Optimization #4427

closed

storage api: use dedicated 'id' type

Added by Victor Julien over 3 years ago. Updated over 3 years 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

Actions #1

Updated by Juliana Fajardini Reichow over 3 years ago

Hi, can I claim this task? Thanks!

Actions #2

Updated by Juliana Fajardini Reichow over 3 years ago

  • Assignee set to Juliana Fajardini Reichow

Claiming this, as authorized by Victor Julien.

Actions #3

Updated by Juliana Fajardini Reichow over 3 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF