Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
81fac53d
Commit
81fac53d
authored
1 year ago
by
Francesco Colista
Browse files
Options
Downloads
Patches
Plain Diff
main/sofia-sip: merged patch that fixes unexpected 482 merged request
See:
https://github.com/freeswitch/sofia-sip/pull/211
parent
a6ba6f44
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/sofia-sip/APKBUILD
+4
-2
4 additions, 2 deletions
main/sofia-sip/APKBUILD
main/sofia-sip/fix-unexpected-482-merge-request.patch
+68
-0
68 additions, 0 deletions
main/sofia-sip/fix-unexpected-482-merge-request.patch
with
72 additions
and
2 deletions
main/sofia-sip/APKBUILD
+
4
−
2
View file @
81fac53d
...
...
@@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname
=
sofia-sip
pkgver
=
1.13.14
pkgrel
=
1
pkgrel
=
2
pkgdesc
=
"RFC3261 compliant SIP User-Agent library"
url
=
"https://github.com/freeswitch/sofia-sip"
arch
=
"all"
...
...
@@ -12,7 +12,8 @@ makedepends="automake autoconf libtool m4
glib-dev openssl-dev>3 lksctp-tools-dev"
checkdepends
=
"check-dev"
subpackages
=
"
$pkgname
-dev"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/freeswitch/sofia-sip/archive/v
$pkgver
.tar.gz"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/freeswitch/sofia-sip/archive/v
$pkgver
.tar.gz
fix-unexpected-482-merge-request.patch"
# secfixes:
# 1.13.11-r0:
...
...
@@ -51,4 +52,5 @@ doc() {
}
sha512sums
=
"
0a0b30e99251f32a3e4d5c1b0e167ae7cffaf93f2e8b9c84ecc96543181418da000a3bc7ea933da42b2943a66e2cef6c690aeda5504e2ead381c9448c77fcf2c sofia-sip-1.13.14.tar.gz
6763a295be4e450e1806be14f22ab4813af238b6ee75d95dbc20b38f7e98d4aa49b8e67a97007e6a4015f8abf54b5d4ae62e38951762e8701ffa2afe90a049d4 fix-unexpected-482-merge-request.patch
"
This diff is collapsed.
Click to expand it.
main/sofia-sip/fix-unexpected-482-merge-request.patch
0 → 100644
+
68
−
0
View file @
81fac53d
From 016cfe1b6abe8e96f4bf0b27ed9ed422267bc3ad Mon Sep 17 00:00:00 2001
From: Ilkka Nurlund <ilkka.nurlund@posteo.ee>
Date: Mon, 10 Apr 2023 06:36:04 +0000
Subject: [PATCH 1/2] nta.c/leg_find: Fix 'by method' leg matching condition
In certain cases 'leg_method' might be null so the IF statement:
if (leg_method && method_name && !su_casematch(method_name, leg_method))
continue;
is not working at all despite 'method_name' is not null. It leads to
leg matching process returns false positive at:
if (loose_match == NULL)
loose_match = leg;
---
libsofia-sip-ua/nta/nta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libsofia-sip-ua/nta/nta.c b/libsofia-sip-ua/nta/nta.c
index e360b7ed..f0ad0539 100644
--- a/libsofia-sip-ua/nta/nta.c
+++ b/libsofia-sip-ua/nta/nta.c
@@ -5120,7 +5120,7 @@
nta_leg_t *leg_find(nta_agent_t const *sa,
if (leg_url && request_uri && url_cmp(leg_url, request_uri))
continue;
- if (leg_method && method_name && !su_casematch(method_name, leg_method))
+ if (leg_method == NULL || method_name && !su_casematch(method_name, leg_method))
continue;
/* Perfect match if both local and To have tag
From 6cf8d6a6e2fb3d7fa10657fd9b9d63017093bce1 Mon Sep 17 00:00:00 2001
From: Ilkka Nurlund <ilkka.nurlund@posteo.ee>
Date: Mon, 10 Apr 2023 08:13:22 +0000
Subject: [PATCH 2/2] nta.c/incoming_find: Fix "Merged Request" case matching
/RFC3261 8.2.2.2; 17.2.3/
Implements missing matching rules (17.2.3.1 and 17.2.3.2)
---
libsofia-sip-ua/nta/nta.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/libsofia-sip-ua/nta/nta.c b/libsofia-sip-ua/nta/nta.c
index f0ad0539..d6d4d748 100644
--- a/libsofia-sip-ua/nta/nta.c
+++ b/libsofia-sip-ua/nta/nta.c
@@ -6238,10 +6238,16 @@
static nta_incoming_t *incoming_find(nta_agent_t const *agent,
/* RFC3261 - section 8.2.2.2 Merged Requests */
if (return_merge) {
- if (irq->irq_cseq->cs_method == cseq->cs_method &&
- strcmp(irq->irq_cseq->cs_method_name,
- cseq->cs_method_name) == 0)
- *return_merge = irq, return_merge = NULL;
+ /* RFC3261 - section 17.2.3 Matching Requests to Server Transactions */
+ if (irq->irq_via->v_branch &&
+ su_casematch(irq->irq_via->v_branch, v->v_branch) &&
+ su_casematch(irq->irq_via->v_host, v->v_host) &&
+ su_strmatch(irq->irq_via->v_port, v->v_port)) {
+ if (irq->irq_cseq->cs_method == cseq->cs_method &&
+ strcmp(irq->irq_cseq->cs_method_name,
+ cseq->cs_method_name) == 0)
+ *return_merge = irq, return_merge = NULL;
+ }
}
}
This diff is collapsed.
Click to expand it.
Francesco Colista
@fcolista
mentioned in commit
aa2d7886
·
1 year ago
mentioned in commit
aa2d7886
mentioned in commit aa2d78868c3e4522a677dc9ebeb9c306682105fe
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment