2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw'
|
2023-03-30 14:53:13 +00:00
|
|
|
DLMGCP MGW(mgw) Message buffer too small, can not generate MGCP message (SDP)
|
2023-02-22 15:30:02 +00:00
|
|
|
DLMGCP MGW(mgw) Failed to add SDP, can not generate MGCP message
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
|
|
|
|
test_mgcp_client_cancel():
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw'
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
- composed msg with trans_id=1
|
|
|
|
- not in queue yet, cannot cancel yet
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) Cannot cancel, no such transaction: 1
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
- enqueue
|
|
|
|
- cancel succeeds
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) Canceled transaction 1
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
- late response gets discarded
|
2023-06-14 10:20:49 +00:00
|
|
|
DLMGCP MGW(mgw) MGCP link to MGW now considered UP
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) MGCP client: Rx 200 1 OK
|
|
|
|
DLMGCP MGW(mgw) Cannot find matching MGCP transaction for trans_id 1
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
- canceling again does nothing
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) Cannot cancel, no such transaction: 1
|
mgcp_client: add transaction cleanup
So far, if an MGCP message is sent, the transaction gets enqueued, but there is
no way to end the transaction other than receiving a valid reply. So, if the
caller decides that the transaction timed out and tears down the priv pointer
passed to mgcp_client_tx, and if then a late reply arrives, the callback will
dereference the invalid priv pointer and cause a segfault. Hence it is possible
to crash an mgcp_client program by sending a late response.
Furthermore, if no reply ever arrives, we would keep the pending response in
the list forever, amounting to a "memory leak".
Add mgcp_client_cancel() to discard a pending transaction. The caller can now
decide to discard a pending response when it sees fit (e.g. the caller's
timeout expired). This needs to be added to OsmoMSC and OsmoBSC.
Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id
from a generated MGCP message.
No public API is broken; but refine the negative return code from
mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still
-1 if decoding failed. This is mainly for mgcp_client_test.
Implement a test for mgcp_client_cancel() in mgcp_client_test.c.
Tweak internal mgcp_client_response_pending_get() to take only the transaction
id as argument instead of the entire mgcp message struct.
Found-by: dexter
Related: OS#2695 OS#2696
Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
2017-11-30 12:43:11 +00:00
|
|
|
test_mgcp_client_cancel() done
|
2018-02-21 14:36:45 +00:00
|
|
|
|
|
|
|
test_sdp_section_start() test [0]:
|
|
|
|
body: ""
|
2019-09-19 01:06:46 +00:00
|
|
|
DLMGCP MGCP response contains no SDP parameters
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2019-09-19 01:06:46 +00:00
|
|
|
got audio_port=0
|
2018-02-21 14:36:45 +00:00
|
|
|
|
|
|
|
test_sdp_section_start() test [1]:
|
|
|
|
body: "\n\n"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=0
|
|
|
|
|
|
|
|
test_sdp_section_start() test [2]:
|
|
|
|
body: "\r\n\r\n"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=0
|
|
|
|
|
|
|
|
test_sdp_section_start() test [3]:
|
|
|
|
body: "\n\r\n\r"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=0
|
|
|
|
|
|
|
|
test_sdp_section_start() test [4]:
|
|
|
|
body: "some mgcp header data\r\nand header params\n\nm=audio 23\r\n"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=23
|
|
|
|
|
|
|
|
test_sdp_section_start() test [5]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nm=audio 23\r\n"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=23
|
|
|
|
|
|
|
|
test_sdp_section_start() test [6]:
|
|
|
|
body: "some mgcp header data\r\nand header params\n\r\n\rm=audio 23\r\n"
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2018-02-21 14:36:45 +00:00
|
|
|
got audio_port=23
|
|
|
|
|
|
|
|
test_sdp_section_start() test [7]:
|
|
|
|
body: "some mgcp header data\r\nand header params\n\r\nm=audio 23\r\n"
|
2019-09-19 01:06:46 +00:00
|
|
|
DLMGCP MGCP response contains no SDP parameters
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2019-09-19 01:06:46 +00:00
|
|
|
got audio_port=0
|
2018-02-21 14:36:45 +00:00
|
|
|
|
|
|
|
test_sdp_section_start() test [8]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\rm=audio 23\r\n"
|
2019-09-19 01:06:46 +00:00
|
|
|
DLMGCP MGCP response contains no SDP parameters
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2019-09-19 01:06:46 +00:00
|
|
|
got audio_port=0
|
2018-02-21 14:36:45 +00:00
|
|
|
|
|
|
|
test_sdp_section_start() test [9]:
|
|
|
|
body: "some mgcp header data\r\nand header params\n\r\rm=audio 23\r\n"
|
2019-09-19 01:06:46 +00:00
|
|
|
DLMGCP MGCP response contains no SDP parameters
|
|
|
|
got rc=0
|
2020-08-28 18:21:55 +00:00
|
|
|
got audio_ip=""
|
2019-09-19 01:06:46 +00:00
|
|
|
got audio_port=0
|
2020-08-28 18:21:55 +00:00
|
|
|
|
|
|
|
test_sdp_section_start() test [10]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 1.2.3.4\r\n"
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="1.2.3.4"
|
|
|
|
got audio_port=0
|
|
|
|
|
|
|
|
test_sdp_section_start() test [11]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP6 2001:db8:1::ab9:c0a8:102\r\n"
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="2001:db8:1::ab9:c0a8:102"
|
|
|
|
got audio_port=0
|
|
|
|
|
|
|
|
test_sdp_section_start() test [12]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP6 1.2.3.4\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [13]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 ::1\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [14]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 notanip\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [15]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 1.2.3.4.5.6\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [16]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 1.2 .3\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [17]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 1.2 .3\r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
|
|
|
|
|
|
|
test_sdp_section_start() test [18]:
|
|
|
|
body: "some mgcp header data\r\nand header params\r\n\r\nc=IN IP4 \r\n"
|
|
|
|
DLMGCP Failed to parse MGCP response header (audio ip)
|
|
|
|
got rc=-22
|
2018-06-07 16:51:31 +00:00
|
|
|
DLMGCP ptmap contains illegal mapping: codec=113 maps to pt=2
|
|
|
|
DLMGCP ptmap contains illegal mapping: codec=0 maps to pt=100
|
|
|
|
DLMGCP ptmap contains illegal mapping: codec=113 maps to pt=2
|
|
|
|
DLMGCP ptmap contains illegal mapping: codec=0 maps to pt=100
|
2021-09-03 15:50:51 +00:00
|
|
|
DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw'
|
|
|
|
DLMGCP MGW(mgw) Cannot compose MGCP e1-endpoint name (ds/e1-15/s-1/su128-0@mgw), rate(128)/offset(0) combination is invalid!
|
|
|
|
DLMGCP MGW(mgw) Cannot compose MGCP e1-endpoint name (ds/e1-15/s-1/su8-16@mgw), rate(8)/offset(16) combination is invalid!
|
|
|
|
DLMGCP MGW(mgw) Cannot compose MGCP e1-endpoint name (ds/e1-15/s-0/su8-2@mgw), E1-timeslot number (0) is invalid!
|
|
|
|
DLMGCP MGW(mgw) Cannot compose MGCP e1-endpoint name (ds/e1-15/s-64/su8-2@mgw), E1-timeslot number (64) is invalid!
|
2023-12-22 01:48:04 +00:00
|
|
|
|
|
|
|
test_parse_response() test [0]:
|
|
|
|
body: "200 2 OK\r\nI: foo\r\n\r\nv=0\r\no=- name 23 IN IP4 0.0.0.0\r\ns=-\r\nc=IN IP4 1.2.3.4\r\nt=0 0\r\nm=audio 23 RTP/AVP 112 3\r\na=rtpmap:112 AMR/8000\r\na=ptime:20\r\n"
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="1.2.3.4"
|
|
|
|
got audio_port=23
|
|
|
|
112 AMR/8000/1
|
|
|
|
3 GSM/8000/1
|
|
|
|
|
|
|
|
test_parse_response() test [1]:
|
|
|
|
body: "200 2 OK\r\nI: foo\r\n\r\nv=0\r\no=- name 23 IN IP4 0.0.0.0\r\ns=-\r\nc=IN IP4 1.2.3.4\r\nt=0 0\r\nm=audio 23 RTP/AVP 112 3\r\na=rtpmap:112 AMR/8000\r\na=rtpmap:3 GSM/8000\r\na=ptime:20\r\n"
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="1.2.3.4"
|
|
|
|
got audio_port=23
|
|
|
|
112 AMR/8000/1
|
|
|
|
3 GSM/8000/1
|
|
|
|
|
|
|
|
test_parse_response() test [2]:
|
|
|
|
body: "200 2 OK\r\nI: foo\r\n\r\nv=0\r\no=- name 23 IN IP4 0.0.0.0\r\ns=-\r\nc=IN IP4 1.2.3.4\r\nt=0 0\r\nm=audio 23 RTP/AVP 3\r\na=rtpmap:112 AMR/8000\r\na=ptime:20\r\n"
|
|
|
|
DLMGCP error in MGCP message: 'a=rtpmap:112' has no matching entry in 'm=audio ... 112'
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="1.2.3.4"
|
|
|
|
got audio_port=23
|
|
|
|
3 GSM/8000/1
|
|
|
|
112 AMR/8000/1
|
|
|
|
|
|
|
|
test_parse_response() test [3]:
|
|
|
|
body: "200 2 OK\r\nI: foo\r\n\r\nv=0\r\no=- name 23 IN IP4 0.0.0.0\r\ns=-\r\nc=IN IP4 1.2.3.4\r\nt=0 0\r\nm=audio 23 RTP/AVP 101 102 103 104 105 106 107 108 109 110\r\na=rtpmap:101 AMR/8000\r\na=rtpmap:102 AMR/8000\r\na=rtpmap:103 AMR/8000\r\na=rtpmap:104 AMR/8"
|
|
|
|
got rc=0
|
|
|
|
got audio_ip="1.2.3.4"
|
|
|
|
got audio_port=23
|
|
|
|
101 AMR/8000/1
|
|
|
|
102 AMR/8000/1
|
|
|
|
103 AMR/8000/1
|
|
|
|
104 AMR/8000/1
|
|
|
|
105 AMR/8000/1
|
|
|
|
106 AMR/8000/1
|
|
|
|
107 AMR/8000/1
|
|
|
|
108 AMR/8000/1
|
|
|
|
109 AMR/8000/1
|
|
|
|
110 AMR/8000/1
|
|
|
|
|
|
|
|
test_parse_response() test [4]:
|
|
|
|
body: "200 2 OK\r\nI: foo\r\n\r\nv=0\r\no=- name 23 IN IP4 0.0.0.0\r\ns=-\r\nc=IN IP4 1.2.3.4\r\nt=0 0\r\nm=audio 23 RTP/AVP 101 102 103 104 105 106 107 108 109 110 3\r\na=rtpmap:101 AMR/8000\r\na=rtpmap:102 AMR/8000\r\na=rtpmap:103 AMR/8000\r\na=rtpmap:104 AMR"
|
|
|
|
DLMGCP SDP: can parse only up to 10 payload type numbers
|
|
|
|
DLMGCP Failed to parse SDP parameter payload types (RTP/AVP)
|
|
|
|
got rc=-22
|
2016-05-20 19:59:55 +00:00
|
|
|
Done
|