Age | Commit message (Collapse) | Author | Files | Lines |
|
Prepare for a future change that accesses bts->network during gsm_bts_alloc().
Currently, gsm_bts_alloc() takes a ctx parameter, and gsm_bts_alloc_register()
then gets the gsm_network pointer and sets bts->network to it. All callers
anyway pass gsm_network as ctx to gsm_bts_alloc(), and anything else would not
make sense anyway. So enforce passing exactly gsm_network to gsm_bts_alloc()
and already set the bts->network pointer from there.
Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a
Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a
|
|
Use new #pragma style instead of #ifndef dance.
Forward-declare all structs we're using pointers of.
Move function comments to their definitions in the .c file.
Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea
|
|
Constify in- and output arguments for Parse Attribute Response Info chain to
avoid compiler warnings, and more clearly indicate const data in the first
place.
Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb
|
|
Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4
|
|
It's only used once in the same file so there's no need to put it into
global header.
Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9
|
|
* change return type to bool
* constify parameters
The nm_is_running(), trx_is_usable() and ts_is_usable() always return
boolean value and are always used as such anyway. The also do not change
their parameters.
Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
|
|
Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a
|
|
Change-Id: I7089062285c40ec11af479c98b43d1d407397c82
|
|
Authentication is no longer done in the BSC, the variables that
set the authentication policy and the IMSI regex have no longer
any effect.
Remove auth policy and authorized-regexp
Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2
|
|
It's leftover from the time when gsm_data_shared.* was actually shared
with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it
entirely and make working with gsm_data_shared.h slightly easier.
Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc
|
|
Report state as degraded if BTS or any of its TRX are administratively
locked.
Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f
Related: OS#2486
|
|
In state prior to this patch, "3G Early Classmark Sending Restriction"
bit in SI3 rest octets was always set to H, which is a sane default as
the policy to send the information is then controlled by "Early
Classmark Sending Control" bit in the same octet.
However, it seems Quortus SoftCore can have some issues decoding the
option, so let's add a vty cmd to be able to disable it for those
having any issues.
Related: SYS#4021
Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec
|
|
Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c
|
|
First off, there are "global" and "local" IMSI black/whitelist levels:
"global" "local"
VTY 'bsc' 'msc' for osmo-bsc
VTY 'nat' 'bsc' for osmo-bsc_nat
Both in osmo-bsc and osmo-bsc-nat, the "global" IMSI filter so far completely
ignores all 'imsi-allow' rules it may contain. A comment in imsi_allow()
proclaims actions that are missing in the code. Notably, in our example config
osmo-bsc_nat.cfg, there is an imsi-allow on the 'nat' level, which with the
code before this patch cannot have been effective in any way.
Furthermore, on the "local" level the order is to check imsi-allow first, and
imsi-deny after that. The comment says to do that in reverse order on the
"global" level. There is no apparent reason for reversing.
Add evaluation of imsi-allow directives on the "global" level, i.e. 'bsc' in
osmo-bsc and 'nat' in osmo-bsc-nat, in the same order as on "local" level, to
avoid confusion. Swap the comment to be consistent.
Before this patch, to have effective imsi-allow, this config would be necessary
for osmo-bsc:
bsc
access-list acl imsi-allow 999999999999999
access-list acl imsi-allow 9017.*
access-list acl imsi-deny .*
msc 0
access-list-name acl
...
msc 1
access-list-name acl
...
With this patch, imsi-allow also works on the "global" level:
bsc
access-list acl imsi-allow 999999999999999
access-list acl imsi-allow 9017.*
access-list acl imsi-deny .*
access-list-name acl
msc 0
...
msc 1
...
Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f
|
|
src/libbsc/bsc_init.c: In function ‘rsl_si’:
src/libbsc/bsc_init.c:153:2: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
return rc;
^
Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1
|
|
The reset context contains a string buffer to allow for setting
a human readable name, that is then displayed in the logs. Since
OSMO-FSMs already have such a feature there is no need for an
extra name variable.
Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc()
to display the name of the FSM
Fixes: Coverity CID#178664
Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1
|
|
When we receive unimplemented/unhandled message types, we shouldn't
simply silently discard them, but print a log message for the
benefit of the user.
Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e
|
|
The function handle_error asserts mgcp_ctx->conn to be non null,
but it does not access it otherwise.
remove unused variable conn
Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404
|
|
Even in the very early ST_CRCX_BTS phase, the error handler may
decide to go to ST_CALL in order to initate the termination of
a possibly half open connection.
Add ST_CALL to the out state list in ST_CRCX_BTS
Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842
|
|
The term MGCP-GW is deprecated, use now MGW
Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f
|
|
the switch statement in fsm_send_assignment_complete() has the
default case at the beginning.
Move the default case to the end to match common coding style
rules
Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc
|
|
Depends: libosmo-sccp I70ec5c8b42682a23f11a5820431c7e34e225709b
Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1
|
|
So far, the config would log an error upon config parsing, and then continue to
use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE
to abort the program in a config parsing error.
Be fatal for non-existing addressbook entries and for using address book
entries from mismatching cs7 instances.
Though it is mixing in cosmetic changes, add "Error:" to the output and arrange
the erratic name to the end of the message, as is customary for error messages.
Related: libosmo-sccp I2f71b9c4dd30f919d2054da81283dd7035f44f60
Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec
|
|
So far, if the user entered an invalid SCCP address in the config, the
osmo_bsc_sigtran_init() code simply replaced that with the default, i.e.
running with a completely different address than the user may intend.
Use the default SCCP addresses only when they are unset by the user.
Default MSC addr: set directly, do not detour via cs7 instance PC. The default
MSC SCCP addr is just a point code + SSN, deriving it from the cs7 instance
first is a confusing step. Just set the PC and SSN, and done.
Using default addresses does not constitute an "auto configuration": if we set
up a cs7 instance automatically, we do not want to have to create a second one
automatically, to prevent "auto-confusion", and want to bail instead. But for
each MSC on its own, using default SCCP addresses makes sense and is orthogonal
to automatic cs7 instance creation. Hence drop the auto config semantics from
the default SCCP address parts.
Always validate the SCCP addresses we will end up using, and bail immediately
if they are erratic. i.e. don't overwrite a non-empty invalid SCCP address with
defaults, but straight bail.
Beneficial side effects:
- Fix some grammar ultra confusion in log messages.
- Add context: log the MSC number the logging refers to.
- Drop code dup: since we're always logging the used SCCP addresses, might as
well log those once, unconditionally, in the end.
Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11
|
|
Use distinctive struct names: s/fsm_/fsm_bsc_reset/. They only exist
in the static context and it works fine, but the mad fsm-to-dot.py script
breaks with identical struct names. Can't hurt to have unique names.
Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741
|
|
osmo-bsc currently negotiates the RTP stream directly with the
BTS and reports back the RTP IP/Port on the BTS. This works fine
for a single BTS, but for Handover the port/ip pointing to the
MSC side must not change, so an entity in between the BTSs and
the MSC is required.
Integrate the mgcp-client and use osmo-mgw to switch the RTP
streams.
Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736
Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a
Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe
Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a
|
|
3GPP TS § 08.08 defines various types of Cell Identifier List IEs, but we only
implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List
that we don't implement, it is best for interoperability to page the entire BSS
and post a log message instead of rejecting the paging altogether. Apart from
resource management, it is not harmful to page more than the MSC requested; if
use of resources becomes an issue, the log message will guide towards the
solution of providing an actually implemented Cell Identifier List IE.
Upon IE length that is other than we expect, log the error, but also fall back
to paging the entire BSS. Overall message length correctness has been checked
earlier.
The particular case observed is that a Huwaei MSC sends a LAI for Cell
Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may
want to add later.
Improve logging: identify the subscriber that is being paged.
Coding style: use a switch() statement to clarify flow and provide a place to
add more implementations later.
Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two
implemented Cell Identifier List IEs as well as the unimplemented LAI
identifier, verify the resulting paging LAC in wrapped function and stderr.
Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351
|
|
To properly decide if a given OML link is degraded we have to use
BTS-specific information about MO state.
* move check function into BTS-specific part
* add generic wrapper
Related: OS#2486
Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2
|
|
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6
|
|
This fixes the following dpkg-shlibdeps warning:
Change-Id: Iea00c209652e8070a59942504bef660db0999e86
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bsc-nat/usr/bin/osmo-bsc_nat was not linked against libosmoabis.so.6 (it uses none of the library's symbols)
|
|
This fixes the following dpkg-shlibdeps warning:
Change-Id: I31af5fb8b52ef1fd5effb139d9cdea1ebe9a41b4
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bsc/usr/bin/osmo-bsc_nat was not linked against libosmonetif.so.4 (it uses none of the library's symbols)
|
|
We output a hexdump for each sccp message we receive, but not when
sending.
Also log the hexdump of sccp messages when sending.
Change-Id: Ibfe52a0b7dbca4c569c603a008d73d0d99d1c345
|
|
We already log the message type of sccp messages we receive, but
for transmitting the log output is missing.
Also log the message type for tramsitted sccp messages.
Change-Id: I6736f15ddc03e5f70c3504abffbae6cbf766c9d7
|
|
A FSM doesn't need "FSM" in its name, as it is obvious that it is a
FSM. Also, having two that are called RESET is confusing, so let's
try to come up with better names.
Also, after Change-Id I9ef59432f43a3cdb94e4cbb0c44ac3f9b2aac0f2 in
libosmocore, we now enforce that no FSM identifiers contain spaces
or other illegal characters.
Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
|
|
The library code for rate counter initialization, which is called
from the descendants of bsc_network_alloc() might already want to
log something (particularly after Change-Id
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.
Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
|
|
Change-Id: I367b7734390daf39160de6462e9b2210368666f4
|
|
unsigned long can be 32 bits on some arch/OS, while "current" field is
always 64 bit because it's a uint64_t.
Change-Id: Ibad1e4f09cf912cb654dbe3687a3f2182e2060f5
|
|
Related: OW#3893
Program terminated with signal SIGSEGV, Segmentation fault.
0 gsm_lchan_name (lchan=lchan@entry=0x0) at gsm_data_shared.c:342
(gdb) bt
0 gsm_lchan_name (lchan=lchan@entry=0x0) at gsm_data_shared.c:342
1 0x0805ab80 in lchan_release (lchan=0x0, sacch_deact=sacch_deact@entry=0, mode=mode@entry=RSL_REL_LOCAL_END)
at chan_alloc.c:410
2 0x0805c1dd in handle_ass_fail (msg=0x94142b8, conn=0x9251048) at bsc_api.c:459
3 dispatch_dtap (msg=0x94142b8, link_id=0 '\000', conn=0x9251048) at bsc_api.c:598
4 gsm0408_rcvmsg (msg=msg@entry=0x94142b8, link_id=0 '\000') at bsc_api.c:658
5 0x08058ca2 in abis_rsl_rx_rll (msg=0x94142b8) at abis_rsl.c:1686
6 abis_rsl_rcvmsg (msg=0x94142b8) at abis_rsl.c:2097
7 0xb7e8cf9a in handle_ts1_read (bfd=0x94e8e08) at input/ipaccess.c:271
8 ipaccess_fd_cb (bfd=0x94e8e08, what=1) at input/ipaccess.c:386
9 0xb7ee8434 in osmo_select_main (polling=polling@entry=0) at select.c:158
10 0x0804bd7c in main (argc=6, argv=0xbfc27144) at osmo_bsc_main.c:272
(gdb) print lchan
$2 = (const struct gsm_lchan *) 0x0
Possible scenario in which this crash can appear:
1- gsm0808_assign_req() calls handle_new_assignment() which sends an CHAN
ACTIVATE msg and arms T10 timer.
2- ACTIVATE ACK is received (handle_chan_ack), which calls
gsm48_send_rr_ass_cmd() which sends an ASSIGNMENT CMD, and doesn't
disable/modify T10 timer.
3- T10 timeout is triggered (assignment_t10_timeout()), which sets
conn->secondary_lchan = NULL
4- Immediately after, the ASSIGNMENT FAILURE message (which might have been
already queued) is processed in handle_ass_fail, and then the crash occurs.
This race condition is not an issue for handle_ass_compl() path because there's
this check there which would trigger most probably if secondary_lchan is NULL:
"if (conn->secondary_lchan != msg->lchan)"
Change-Id: I3798b36c628f75d4e8bc7b0996c27d695d53fbb1
|
|
Previously if we ran out of space while adding EARFCN, we simply return
which might result in malformed SI2q. Fix it by proper rollback of
entire EARFCN. While at it, let's be paranoid and introduce extra checks
against integer overflow in budget calculations.
Change-Id: I4b2aa3825e9affb6dfeadecdf24dd1a43a92b7b7
Related: OS#2357
|
|
Expose OML link uptime available via vts's "sh bts 0" command with the
new "bts.0.oml-uptime" ctrl command. To avoid code duplication, move
uptime computation into separate function and use it for both.
Change-Id: Iec405aa949d6a38a9c8e64cd7ee4b49fd416835d
Related: OS#2486
|
|
* fix insert routine to keep the list sorted by UARFCN
* fix rest octets generator to properly account for offset
* adjust test results accordingly
Change-Id: I443c5c5f937b490578354f3c8a0c5b92629f2794
Related: OS#2357
|
|
OML link state is available via vty ("sh bts 0" command) and
ctrl ("oml-connection-state" RO variable).
When showing OML link state, take into consideration RSL link state as
well: if OML is up but RSL is missing show it as degraded.
That's implemented via BTS model-specific functions (currently Sysmo- and
Nano- BTS only)
Change-Id: I5952fc59e4d82e0aa627ad91d20f964d9559a4c4
Related: OS#2486
|
|
* expand comments, fix typos
* constify parameter
* move try-add-adjust routine into separate function to facilitate
further modifications
* remove excessive checks and unnecessary return values
* move (UARFCN, Scrambling Code) tuple uniqueness check into separate
function and use it early
Change-Id: Ia72f848dec40723510ca56868e08081804227d47
Related: OS#2357
|
|
Currently, OSMO_ASSERT() is defined such that it ends in a semicolon, hence an
added ';' is redundant. However, the usual way this kind of macro should be
defined is
#define OSMO_ASSERT(x) do { ... } while(0)
so that the compiler requires a trailing semicolon.
To prepare for such a change possibly coming up in libosmocore, add ';' to all
OSMO_ASSERT() users.
Change-Id: If6dce81faee9177737a6e1b572a871aaf7e37138
|
|
In masurement reports sent by the MS, this can then be used to correlate
if a given measurement report was in response to a BCCH/neighbor list
received on BCCH (SI2xxx) or on dowlink SACCH (SI5xxx).
Closes: OS#2525
Change-Id: I1cd0dc51026dcd0e508e63eea4e333e6b184787a
|
|
Change-Id: I5afc6e6a5a1d6b6a8ee73fdb60cc28074cf8585b
|
|
Save the time when OML link to BTS was established and show it in
vty. That's useful when troubleshooting issues like periodic/sporadic
BTS restart.
Related: SYS#3889
Change-Id: I9e4e8504afe8ca467b68d41826f61654e24d9600
|
|
Remove trivial functions by using more specific defines for CTRL
commands.
Change-Id: I10d6d18663aed87324d60472a0fc3bd1d0961dea
|
|
* drop unused header
* fix name of jenkins test
* remove dead code
Change-Id: I986904864741995910b6ba92173b9f7b1b03e2f1
|
|
Previously we've used function so debug print always pointed to the same
place which is not very useful. Wrap it with macro so proper
file:line is printed. Also, make sure that we always change state only
through this wrapper and log only when the state has changed.
Change-Id: I21789f8021290965b61a54a2b23177ccbbfe8321
|