Commit Graph

39 Commits

Author SHA1 Message Date
Max ddee01fa8f Add regexp authorization policy for IMSI
* extend "auth policy" vty command with new option "regexp"
* add vty command "authorized-regexp" for setting arbitrary POSIX
  regular expression
* add basic vty test
* add optional "regexp" argument to subscriber-create-on-demand vty
  command

With those in place we can now set the regexp against which MS's IMSI
will be matched.

If IMSI match the regexp than MS is allowed to access the network. If
subscriber is already marked as authorized in HLR than it'll be allowed
regardless of IMSI matching.

The same way we can decide whether to create subscribers on-demand
basesd on IMSI regexp match. Similar to authorization this restriction
can be overridden by manually creating subscriber via vty, ctrl
interface or directly in HLR.

Change-Id: I525f4b80676de47d1d422686da2ca012301b0129
Fixes: OS#1647
2016-06-05 09:36:37 +00:00
Max c08ee71bff Move DTX settings to BTS
* Add per-BTS DTX settings
* Configure Uplink and Downlink DTX separately
* Deprecate global DTX option (it was never tested/used anyway)
* Use libosmocore function for DTX indicator in System
  Information (previously it was incorrectly assigned for half-rate
  channels)

Related: OS#22
Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4
Reviewed-on: https://gerrit.osmocom.org/40
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-17 16:17:54 +00:00
Max 59a1bf3dae Add basic SI2quater support
* support for sending arbitrary static SI2quater.
* vty interface for neightbor EARFCNs specific to SI2quater.
* dynamic generation of SI2quater messages.
* unit test for SI2quater messages.

Fixes: OS#1630
2016-04-16 13:47:56 +02:00
Harald Welte a2bbc5ec0e Fix TSC/BSIC handling bug and remove bts->tsc
This fixes a bug in the following circumstances:
* BSIC is set to 0 in the config file
* No TSC is explicitly specified at the BST level in the config file

In this case, we ended up using BSIC=0 and TSC=7, as TSC=7 is our
default initialization value.

The TSC of the CCCH/BCCH must always be the BCC, which is the lower 3
bits of the BSIC.  Having configuration options for both the BSIC _and_
the TSC at the BTS level therefore makes no sense, as it only adds ways
in which users can configure non-oprational configurations.  So we
remove the bts->tsc member, and keep only the ts->tsc members that allow
us to configure a timeslot-specific TSC that's different from the BTS
TSC (= BCC).
2015-11-20 10:43:31 +01:00
Andreas Eversberg 4d4944a07d Add option to set RADIO LINK TIMEOUT value via VTY 2015-08-17 16:31:35 +02:00
Sipos Csaba 56e1766dba nokia: Allow to set the reset time for the nokia bts 2015-02-07 13:27:36 +01:00
Holger Hans Peter Freyther 4e13a8f9f9 bsc/nitb: Allow to set the GPRS mode through the ctrl command
Create a control command to read and modify the gprs mode. Use
the get_string_value to indicate if the value was found or not.
This is useful for the ctrl interface where I didn't want to
replicate "none", "gprs" and "egprs". Share code to verify that
a BTS supports the mode.

Related: SYS#591
2015-01-31 22:38:48 +01:00
Holger Hans Peter Freyther f7e23c5ff7 bts: When one link drops.. check what needs to be dropped
In case a BTS is dropped, iterate over the list of BTS and check
if a dependency is now missing and then drop the BTS. This check
could lead to check of 256*256 checks (e.g. all BTS on each other
in the chain and the master is being dropped). The performance
aspect of it doesn't matter for our usecase. We expect to have
pairs of BTS right now.
2014-12-17 15:50:11 +01:00
Holger Hans Peter Freyther c22930e24b bts: Add some simple dependency between different BTS
E.g. for the sysmoBTS2050 we have the requirement that the first
board connects before the second due clocking. The easiest point
to enforce this is the BSC. Add a simple bitmask based system to
allow to express dependencies for IP based systems.
2014-12-17 14:46:17 +01:00
Jacob Erlbeck cdd4302c6d bsc: Move gsm_network_init function to libbsc
Currently libcommon depends on libbsc, because gsm_network_init
(libcommon/gsm_data.c) directly calls gsm_net_update_ctype
(libbsc/gsm_04_08_utils.c).

This patch moves gsm_network_init to a new file libbsc/net_init.c.

Sponsored-by: On-Waves ehf
2014-11-11 22:52:04 +01:00
Harald Welte 1449c9f06f move gsm_bts_num() to gsm_data_shared.[ch]
this way we can drop a copy of this function from osmo-bts.
2014-08-24 12:47:12 +02:00
Holger Hans Peter Freyther f0167ddfc2 hsl: Remove the support for the HSL bts from OpenBSC
The support has been implemented for an old model, we were told that
newer versions would be made incompatible with OpenBSC. Ther are
various warnings in the code and coverity has found some new ones.

Just remove the code as we don't know of anyone using this code.
2013-07-03 16:19:41 +02:00
Andreas Eversberg 75e13a41dc Fix of IMMIDIATE ASSIGNMENT REJECT message
The message was corrupt at several points. They are fixed now and
successfully tested.

A default T3122 timer value of 10 is defined by default now. If set to 0,
the reject message will not be sent. Note that when using existing configs
with T3122 value set to 0.
2013-02-08 08:25:17 +01:00
Holger Hans Peter Freyther 2a896070a7 bsc: Auto RF Off in case of missing MSC connection
For short IP failures we want the RF to stay up and wait for
the re-connect but in case the A-link is gone too long it is
good to switch off the RF and wait for commands to enable it
again.
2013-01-15 13:52:00 +01:00
Daniel Willmann 4d62d63151 Stricter limits for T3212 (location update period)
libcommon: Default to 30min location update period
libbsc: Limit VTY value for periodic update and disallow the value 0

According to GSM 04.08 Table 10.5.33 "The value 0 is used for infinite
timeout value i.e. periodic updating shall not be used within the cell."

This was the default value until now, but the code that deals with
expiring inactive subscribers in the next commit can't handle that case
so this remains a TODO for now.
2013-01-01 17:19:46 +01:00
Andreas Eversberg 2ee7ecddeb Allow setting of Control Channel Description parameters via VTY 2012-10-18 12:01:32 +02:00
Daniel Willmann 47b5b3eeb2 gsm_data: Include a structure for the geographical location in gsm_bts 2012-09-11 15:22:00 +02:00
Holger Hans Peter Freyther 86f240aded gsm_data: Address compiler warning of unhandled switch
gcc does not really know the _NR_OF_ELEMENTS_IN_ENUM approach, add
the _NUM_GSM_BTS_TYPE to the handled cases.

gsm_data.c: In function ‘gsm_set_bts_type’:
gsm_data.c:349:2: warning: enumeration value ‘_NUM_GSM_BTS_TYPE’ not handled in switch [-Wswitch]
2012-09-11 12:41:22 +02:00
Harald Welte e555c2b545 VTY: dynamically create BTS "type" command syntax 2012-08-17 13:02:12 +02:00
Harald Welte f383aa11a5 BSC: introduce new "sysmobts" BTS model
so far, osmo-bts/sysmobts used to be entered as "sysmobts" type in the
configuration file.  However, there are some differences in the
protocol/behaviour and we should reflect that by a new BTS plugin (with
lots of code reuse from the nanobts driver).
2012-07-02 20:13:08 +02:00
Harald Welte 67161f27d1 Allow VTY-based configuration of T3105
This timer will only be forwarded to BS11 and Ericsson Abis so far,
not to Nokia and ip.access BTS yet.
2012-06-03 16:58:18 +02:00
Holger Hans Peter Freyther 20fea24515 bsc: Prepare to have multiple MSC connections
We now have a list of MSCs but in the code we will
try to access the MSC with the nr 0.
2012-03-16 11:56:21 +01:00
Holger Hans Peter Freyther 8ec4952557 bsc: Create a osmo_bsc_data and embed osmo_msc_data
We want to have multiple MSCs but we also have some data
that is only present on a per BSC basis. Right now the
MSC data is not allocated with talloc, so we have some
change in the talloc contexts.
2012-03-16 11:56:10 +01:00
Holger Hans Peter Freyther f02bb200c5 misc: gsm_data.c address compiler warning
Assume nothing special needs to be done for the Nokia
*site hardware.

GCC warning:
gsm_data.c: In function ‘gsm_set_bts_type’:
gsm_data.c:342:2: warning: enumeration value ‘GSM_BTS_TYPE_NOKIA_SITE’ not handled in switch [-Wswitch]
2012-02-03 20:02:54 +01:00
Holger Hans Peter Freyther 06c9da6c22 misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_reg
Move the regexp parsing code from the NAT to libcommon as it will
be used by the NAT and BSC code. This also adds the #include <regex.h>
include to gsm_data. This header should be split up.
2011-08-22 18:21:33 +02:00
Dieter Spaar 1664602476 Initial version of Support for Nokia *Site BTS
This includes the MetroSite, but also other Nokia BTS models.
2011-08-10 10:51:01 +02:00
Harald Welte 28307643d7 gsm_data: don't free a bts that's not even allocated yet 2011-06-06 17:52:56 +02:00
Harald Welte 3300c01e82 split gsm_data.c in gsm_data_shared.c and gsm_data.c
This facilitates the use of gsm_data.c from osmo-bts
2011-06-05 13:31:33 +02:00
Harald Welte 135a648ad7 Introduce per-ts TSC
This allows us to configure a TSC for each timeslot, not just one globally for
the entire BTS.
2011-06-03 14:03:27 +02:00
Harald Welte d64c0bca17 gsm_data_shared: introduce 'struct gsm_abis_mo'
... as a common wrapper around nm_attr and nm_state
2011-06-03 14:03:27 +02:00
Harald Welte 867d9f3985 abis_nm: fix some fallout regarding abis_nm migration to libosmocore
Thanks to Holger for noticing this.
2011-05-23 20:30:39 +02:00
Pablo Neira Ayuso 0d2881ad58 bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.

This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.

I added two new attributes to the gsm_bts object, they are:

* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.

* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().

Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.

While I was at it, I added several changes/cleanups to this patch:

* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.

* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.

* Add missing e1inp_init() in osmo-bsc.

* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-22 21:03:35 +02:00
Pablo Neira Ayuso dfb342c19a src: use namespace prefix osmo_counter*
Summary of changes:

s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free
2011-05-06 12:14:16 +02:00
Holger Hans Peter Freyther e188010512 bsc: Allow to have a list of MSCs/MUXs to connect to
Be able to configure a list of destinations (duplicates allowed)
that will be tried in a round robin fashion. The change is in
the bsc_msc_connection to operate on a list. We achieve the
round robin nature with the same trick used in the paging code
to delete and append the current entry. The nat code was updated
to compile but one can only configure one destination.
2011-04-26 09:36:19 +02:00
Daniel Willmann 163f612326 bsc: Point back from struct osmo_msc_data to struct gsm_network 2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte fd355a3c6f [HSL] initial support for the HSL 2.75G Femtocell
The HSL Femtocell seems to be a poor man implementation of the
ip.access Abis/IP protocol, but cutting corners wherever possible.

We try to workaround those corners wherever possible...
2011-03-04 13:44:07 +01:00
Harald Welte 89579b4317 prefix sub-directories containing libraries with 'lib'
... and make sure tests work again after restructuring
2011-03-04 13:23:09 +01:00