|Age||Commit message (Collapse)||Author||Files||Lines|
There are some situations in which osmo-bsc releases a call without
sending a DLCX to the media gateway. The 'laforge/fsm' has a more
proper solution to the problem, this is an interim hack which just
sends an unsolicited DLCX before the CRCX.
don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.
The OsmoBSC code contained a refcount leak on bsc_subscr in the paging
code. For every PAGING command received from the MSC we consistently
leaked one refcount, resulting in a resulting memory leak.
This command lists the currently-active bsc_subscr and their contents,
the format looks like this:
OsmoBSC> show subscriber all
IMSI TMSI LAC Use
001010123456789 ffffffff 65534 3
001010100000001 a1b2c301 65534 1
Currently the pasing results from the RTP ip/port are fed into
inet_addr without checking the results.
Check the return code of inet_addr to be sure that the IP-Address
got properly decoded.
when a transaction to the MGW times out, then the context
information is freed. Unfortunately the client is not informed
about this and will try to execute the callback anyway.
explicitly cancel the transaction in order to prevent access
to already freed data structures.
This field was used in write-pnly mode, i.e. set but never read.
This clarifies which members of the struct are for what.
libosmo-sccp is the old sccp-lite-focused SCCP implementation that we
used before libosmo-sigtran was created. The new osmo-bsc in this
repository is using libosmo-sigtran and shouldn't be using parts of
We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat,
which is not even built in this repository anymore (or 'again yet'?)
The network name and other MM INFO is controlled by the MSC, not the BSC.
The LU reject cause (like anything MM related) is under control of
OsmoMSC, not BSC.
RRLP is handled in OsmoMSC after the split from NITB, so let's remove
any bogus VTY commands left over in the BSC.
There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.
libtrau will be re-introduced as part of osmo-mgw later.
The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not BSC-specific: leftovers from repository split which are now
available in osmo-python-tests as well.
Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this:
* allocate network struct once and use it for all tests
* deregister rate_ctr group after each test
* free bts struct after each test
Properly match up any A5/N with the MSC's list of permitted algos.
Properly set the reject cause in case of mismatching algorithm choices.
Actually allow choosing A5/1 thru 3 as configured on the VTY, by passing
a5_encryption through to gsm0808_cipher_mode() (instead of a hardcoded 1).
Properly handle failure rc of gsm0808_cipher_mode() by sending a reject
Cosmetically clarify which GSM0808_IE_ENCRYPTION_INFORMATION bits mean what by
means of local variables; add some comments on expected encryption formats; add
comment that the BSC should be able to have more than one a5_encryption.
Related: OS#2745 OS#2755
Those NACKs shouldn't happen in production, and if they do, you probably
want to have a more persistent figure than a line in the log file about
it. Having counters allows the user to monitor this efficiently.
Those NACKs (CRCX/MDCX/PDCH_ACT) shouldn't happen in production, and
if they do, you probably want to have a more persistent figure than
a line in the log file about it. Having counters allows the user
to monitor this efficiently.
Our T3113 timer default of 60s was set early in the development of
OpenBSC, where we didn't really know what values to use and used
excessively large/safe values. Paging the same MS for 60 seconds (even
if there's no paging response) will however create a lot of PCH load for
no good reason.
It seems there's no clear guidance as to what the value should be. Other
implementations use something in the order of 10 seconds (OpenBTS,
yateBTS), which seems more realistic. THe Siemens BS-11 has a default of
Let's be conservative and go to 10s as a default, which is already 6
times less potential PCH usage than our default so far...
Counting the number of T3113 expirations (one per subscriber per BTS)
vs the number of paging attempts (Bsc global) is a ueseless figure,
as you cannot relate each other.
We count on the BSC level:
* how many PAGING we received from the MSC (total)
* how many of those were for cells/LACs we don't serve
* how many of those resulted in PAGING RESPONSE
We count on the BTS leve:
* how many PAGING CMD we sent to the BTS (total)
* how many of those we ignored as we were already paging
* how many of those resulted in PAGING RESPONSE
* how many were expired due to T3113 expiring
I discovered that the per-BTS counter group could only be requested
for BTS 0 but didn't work for any further BTSs.
This is a bug introduced in Change-Id I5bd9e6e333b1c396beae46630986b17e7f8b82ef
where we introudce the per-BTS counters,t but allocate all of them with
Make the comments for struct mgcp_ctx more expressive
The BSSMAP reset causes the paging requests to be flushed. When
this happens right after startup then calling paging_flush_bts()
may be called when the list bts->paging.pending_requests is not
yet initalized, which causes a segfault.
Call paging_init_if_needed() to be sure that the list is
inizalized (like the other functions also do)
Initialize the llist head gsm_bts->paging.pending_requests at the time gsm_bts
is allocated, not only at paging_init_if_needed().
The gsm_bts->paging sub-struct is invalid as long as gsm_bts->paging.bts
doesn't point back to bts. Hence the recently added iteration of
gsm_bts->paging.pending_requests should have checked whether bts is NULL. The
llist_head pending_requests is not initialized unless paging_init_if_needed()
has been called (and paging.bts is hence set). However, this fix is a safer way
to prevent errors like this in general.
The segfault was introduced by d382bf63e2b7e28fe41c5310c26fe584f0356897 /
According to the spec it's an empty 1-byte element reserved for future
extension but we still have to generate padding properly. Add stub
function similar to the used for SI2ter and adjust test output
When the MSC has lost its state and issues a RESET, we should not only
clear all ongoing radio connections, but we should also stop any paging.
There's no point in paging a subscriber if the MSC doesn't know about
this paging anymore.
The call-back was needed inside the NITB to determine which part (CC,
SMS, ...) had triggered a given paging. A pure BSC doesn't need that
feature, so let's get rid of it.
The 'void *cbfn_data' is replaced with a 'struct bsc_msc_data *', as
all callers use it with that type.
This was created during code review towards some upcoming fix for
OS#2736. However, it's not really related to that.
This timer is started when a channel is allocated with an IMMEDIATE
ASSIGNMENT message. It is stopped when the MS has correctly seized the
channel. Ever since the early days of development we were using a very
long timeout to be on the safe side. However, in production networks
this is a terrible waste of resources, as we will occupy 10s worth
of air-time on one of our channels for each RACH request we receive.
The only scenarios where you might need something absurdly high as 10s
would be if you have 8s of RTT between your BTS and the BSC.
See also https://osmocom.org/projects/osmobsc/wiki/Timers
Previously we simply omitted SI2ter Rest Octets which is spec violation
which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix
this by generating empty 'no rest octets' with proper padding. Adjust
test output accordingly.
- use unique enum/struct fsm struct names
- use macro to shift bits in FSM description
- use OSMO_STRINGIFY to generate the state names
- remove duplicate logging of states and events
- remove unnecessary space in log strings
- prefix hexadecimal enpoint ids with
- remove unnecessary log messages
- rename bsc_mgcp_cause_codes_str to bsc_mgcp_cause_codes_names
* check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both
NSVC are locked than report it as degraded
* check TRX usability: use already available function to check that TRX
is actually usable when reporting OML status via CTRL
* fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is
defined in libcommon-cs but neither libbsc itself nor tests using it
are actually linked against libcommon-cs
This is left over from the OsmoNITB days. We're defining and allocating
these MSC counters, but never actually using them. This also means that
the automatic counter export will list them, raising the expectation at
users that such counters could be used in OsmoBSC.
Let's remove them. They are in OsmoMSC, but not OsmoBSC.
In more recent versions of libosmocore, we are converting any '.'
in [rate] counter names to ':' to avoid clashes with the special
meaning of '.' in the CTRL interface. Let's avoid any conversion
and use the proper name already here.
This also changes the codec_foo counters to codec:foo to follow the
notation of other counters.
We used to have a lot of counters only globlly per BSC, but they're
much more useful on a per-BTS level.
Make it future compatible for changes. Otherwise it will break
when additional enums are adding to chreq in libosmocore.
Depends on libosmocore Id67ba8de89dd6288e449197438e9e1c5d7f5a134
the parameter list of osmo-fsm callbacks contains a pointer
to the fsm instance. Use this pointer instead of reaching
out for mgcp_ctx->fsm.
add missing line break
the log messages have prefixes that mark important phases (CRCX/BTS,
etc...). Some lines lack the prefix.
Add missing prefixes.
remove the casting of void *data, just assign directly