Project

General

Profile

Actions

Bug #5242

open

A-bis/RSL: CRCX ACK indicates '0.0.0.0' as the local/bind address

Added by fixeria over 2 years ago. Updated almost 2 years ago.

Status:
Stalled
Priority:
Normal
Assignee:
Category:
Abis
Target version:
-
Start date:
09/30/2021
Due date:
% Done:

0%

Spec Reference:

Description

Currently both TC_speech_rtp_tchf and TC_speech_rtp_tchh fail, because CRCX ACK from osmo-bts indicates '0.0.0.0' as the local/bind address. The local/bind address of osmo-bts is needed in order to know where to send RTP packets for the RTP_Emulation component, and of course '0.0.0.0' cannot be used as the remote address for send(). See the attached PCAP file.


Files

gsm_abis_rsl.pcap.gz gsm_abis_rsl.pcap.gz 679 Bytes fixeria, 09/30/2021 09:25 AM
Actions #1

Updated by fixeria over 2 years ago

Interestingly enough, osmo-bsc does not include RSL_IE_IPAC_REMOTE{IP,PORT}_ in its CRCX messages:

msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode);
msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload);

however it does include them in the MDCX messages:

msgb_tv16_put(msg, RSL_IE_IPAC_CONN_ID, lchan->abis_ip.conn_id);
msgb_v_put(msg, RSL_IE_IPAC_REMOTE_IP);
att_ip = (uint32_t *)msgb_put(msg, sizeof(uint32_t));
*att_ip = htonl(dest_ip);
msgb_tv16_put(msg, RSL_IE_IPAC_REMOTE_PORT, dest_port);
msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode);
msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload);
if (lchan->abis_ip.rtp_payload2)
        msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD2, lchan->abis_ip.rtp_payload2);

While in the test cases we send everything in a single CRCX message.

Actions #2

Updated by fixeria over 2 years ago

Interestingly enough, osmo-bsc does not include RSL_IE_IPAC_REMOTE{IP,PORT}_ in its CRCX messages:

And this causes osmo-bts to include bind address of the A-bis/RSL connection:

if (connect_ip && connect_port) {
        /* if CRCX specifies a remote IP, we can bind()
         * here to 0.0.0.0 and wait for the connect()
         * below, after which the kernel will have
         * selected the local IP address.  */
        ipstr = "0.0.0.0";
} else { // <-- (!) Taking this branch
        /* if CRCX does not specify a remote IP, we will
         * not do any connect() below, and thus the
         * local socket will remain bound to 0.0.0.0 -
         * which however we cannot legitimately report
         * back to the BSC in the CRCX_ACK */
        ipstr = get_rsl_local_ip(lchan->ts->trx);
}       
rc = bind_rtp(bts, lchan->abis_ip.rtp_socket, ipstr);

So in the test cases we may simply omit both RSL_IE_IPAC_REMOTE{IP,PORT} and everything should work. However, I believe that including '0.0.0.0' is wrong and we need to do something about that. laforge any ideas/proposals?

Actions #3

Updated by fixeria over 2 years ago

  • Status changed from New to Feedback
  • Assignee set to fixeria
Actions #4

Updated by pespin over 2 years ago

Upon CRCX it is fine for the BSC to set "0.0.0.0" as the destination IP address (BSC-local address), which has the meaning "use same IP address as RSL connection".

Receiving "0.0.0.0" as Source Address (BTS-local address) should be understood by the BSC as not receiving any address imho.

Actions #5

Updated by fixeria almost 2 years ago

  • Status changed from Feedback to Stalled

I worked around the problem in BTS_Tests.TC_speech_rtp_tch[fh]:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27993 library/RSL_Types: alow omitting IEs in ts_RSL_IPA_CRCX [NEW]
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27994 BTS_Tests: workaround addr='0.0.0.0' in f_rtpem_activate() [NEW]

and created a separate test case reproducing what's described in this ticket:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27995 BTS_Tests: add TC_ipa_crcx_ack_addr reproducing OS#5242 [NEW]

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)