From d5ca8c6da2f085b0752f47fc0ec7a74e28d1419c Mon Sep 17 00:00:00 2001 From: Vlad Paiu Date: Thu, 22 Aug 2024 18:34:37 +0300 Subject: [PATCH] Fix comparision of SIP URIs, add GR and PN related params checks (cherry picked from commit 8fa7bcb9ce4550c978f99bc7aaed21fdf7e28e7e) --- parser/msg_parser.h | 3 +++ parser/parse_uri.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/parser/msg_parser.h b/parser/msg_parser.h index 7c173b3b289..61bd9c617eb 100644 --- a/parser/msg_parser.h +++ b/parser/msg_parser.h @@ -208,6 +208,9 @@ struct sip_uri { str pn_prid_val; str pn_param_val; str pn_purr_val; + /* XXX - in the future when adding params as special links + * in the list above, make sure to also update compare_uris() function + * to explicitly compare these here */ /* unknown params */ str u_name[URI_MAX_U_PARAMS]; /* Unknown param names */ diff --git a/parser/parse_uri.c b/parser/parse_uri.c index 937ea70cec1..e37c970ed7a 100644 --- a/parser/parse_uri.c +++ b/parser/parse_uri.c @@ -1799,6 +1799,11 @@ int compare_uris(str *raw_uri_a,struct sip_uri* parsed_uri_a, compare_uri_val(method_val,strncasecmp); compare_uri_val(lr_val,strncasecmp); compare_uri_val(r2_val,strncasecmp); + compare_uri_val(gr_val,strncasecmp); + compare_uri_val(pn_provider_val,strncasecmp); + compare_uri_val(pn_prid_val,strncasecmp); + compare_uri_val(pn_param_val,strncasecmp); + compare_uri_val(pn_purr_val,strncasecmp); if (first.u_params_no == 0 || second.u_params_no == 0) /* one URI doesn't have other params,