]> git.ipfire.org Git - thirdparty/suricata.git/commit
sdp: stringify structured fields
authorGiuseppe Longo <giuseppe@glongo.it>
Fri, 4 Oct 2024 06:56:24 +0000 (08:56 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 2 Apr 2025 20:36:16 +0000 (22:36 +0200)
commitb481705ff827f5237a9b16666247e48a1751cff6
tree39e04af799517b7374d7d0ba568e6f6eb56a50ee
parent891da0fa4a814336f90562ced003dfe5ddd1627f
sdp: stringify structured fields

The current parser implementations take a field, such as connection data, and
split it into subfields for a specific structure (e.g., struct ConnectionData).
However, following this approach requires several sticky buffers to match the
whole field, which can make a rule a bit verbose and doesn't offer any advantage
for matching specific parts of a field.

With this patch, a single line is still split into pieces if it makes sense for
parsing purposes, but these pieces are then reassembled into a single string.
This way, only one sticky buffer is needed to match the entire field.

Ticket #7291
rust/src/sdp/logger.rs
rust/src/sdp/parser.rs