Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust/sip: register parser for tcp v5 #9321

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions etc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3772,7 +3772,10 @@
"rfb": {
"$ref": "#/$defs/stats_applayer_error"
},
"sip": {
"sip_udp": {
"$ref": "#/$defs/stats_applayer_error"
},
"sip_tcp": {
"$ref": "#/$defs/stats_applayer_error"
},
"smb": {
Expand Down Expand Up @@ -3889,7 +3892,10 @@
"rfb": {
"type": "integer"
},
"sip": {
"sip_udp": {
"type": "integer"
},
"sip_tcp": {
"type": "integer"
},
"smb": {
Expand Down Expand Up @@ -4000,7 +4006,10 @@
"rfb": {
"type": "integer"
},
"sip": {
"sip_udp": {
"type": "integer"
},
"sip_tcp": {
"type": "integer"
},
"smb": {
Expand Down
6 changes: 3 additions & 3 deletions rust/src/sip/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 02110-1301, USA.
*/

// written by Giuseppe Longo <giuseppe@glono.it>
// written by Giuseppe Longo <giuseppe@glongo.it>

use nom7::bytes::streaming::{take, take_while, take_while1};
use nom7::character::streaming::{char, crlf};
Expand Down Expand Up @@ -59,7 +59,7 @@ pub struct Response {

#[inline]
fn is_token_char(b: u8) -> bool {
is_alphanumeric(b) || b"!%'*+-._`".contains(&b)
is_alphanumeric(b) || b"!%'*+-._`~".contains(&b)
}

#[inline]
Expand All @@ -69,7 +69,7 @@ fn is_method_char(b: u8) -> bool {

#[inline]
fn is_request_uri_char(b: u8) -> bool {
is_alphanumeric(b) || is_token_char(b) || b"~#@:".contains(&b)
is_alphanumeric(b) || is_token_char(b) || b"~#@:;=?+&$,/".contains(&b)
}

#[inline]
Expand Down
Loading
Loading