Commit Graph

4041 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 7e9b039a94 nat: Add an example for a black list 2013-04-18 15:11:49 +02:00
Holger Hans Peter Freyther 70c58ef03b ctrl: Provide a reply in case the range check failed 2013-04-17 14:34:36 +02:00
Holger Hans Peter Freyther d38cf50d0a ctrl: Make the commands static to not pollute the namespace
We do not need to access these commands from another compilation
unit and can just make it static.
2013-04-17 14:34:26 +02:00
Holger Hans Peter Freyther b2b291d3ef nat: Extract the LAC/CI from the Complete Layer3 Information
Find the Cell Identifier from the Complete Layer3 Information and
store it for future reference. We could begin to verify that the
LAC/CI used really belongs to the BSC.
2013-04-16 14:14:17 +02:00
Holger Hans Peter Freyther c279e39c12 nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"
The name sccp_connection is used in the osmo-sccp code, sccp_connections
was used in the NAT for tracking a sccp_connection. Rename it so it is
obvious that the struct belongs to the nat.

The rename was done with sed:
$ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \
		include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16 09:53:13 +02:00
Holger Hans Peter Freyther 0e5f5aeaad debian: Begin the 0.13.0 series with a new changelog entry 2013-04-16 09:23:33 +02:00
Holger Hans Peter Freyther dbd9449a16 nat: Allow to re-write international numbers in the CC Setup messages
Prepend the international number with a '+' and then do the normal
re-writing on it. There are a couple of ways to handle this:

	\+([0-9]), \+[0-9][0-9]([0-9]), \+49([0-9])

Add a test case for the international re-write based on an already
internationalized number.
2013-04-16 09:20:06 +02:00
Holger Hans Peter Freyther 27b6184225 nat: Allow to daemonize the NAT process
Add handling for the 'D' option
2013-04-16 09:20:00 +02:00
Holger Hans Peter Freyther dc3a78f0c4 Merge commit 'zecke/mgcp-statistics' 2013-04-16 09:18:29 +02:00
Holger Hans Peter Freyther ac04d8d55e nat: Name the variable more properly and begin with net.1.bsc.%d
We can identify the NAT and BSC given the types of the variable,
no need to put them into the value itself.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 7d7054eafa nat: Include the sccp_src_ref and sccp_dst_ref for this call
This can help with some post analysis for failed calls and helps
finding the connection in the pcap trace.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 7c831ecd19 nat: Do not allow the amount of pending responses to grow infinitely
Limit the amount of pending DLCX responses to three times the amount
of available endpoints. Currently all MGCP messages are sent and handled
in sequence.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 931ad6ac33 nat: Reword the log messages as this is normal operation
The bsc_mgcp_dlcx method is called from the mgcp policy callback
but also from inside the nat core when the SCCP connection is going
away.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 462b7d7158 nat: We want the remote to respond to our DLCX request
We want to send a TRAP with the MGCP statistics from the NAT and
the connected BSC. The BSC endpoint can be either released because
of a DLCX from the MGCP CallAgent or the SCCP Connection release on
the A-link.

This is why we need to queue the statistics when the deleting the
endpoint on the BSC. The processing is continued once the response
arrives. This code assumes that the response of the DLCX will be sent
by the remote side. The current amount of outstanding responses can be
seen on the VTY. This assumption is based on the fact that the BSC has
already responded to the CRCX and maybe to the MDCX.

The MGCP RFC is bended to prefix the transaction identifier with "nat-"
to easily detect the response and hand it to the handler. This will
then parse the response and generate the TRAP. The current version is
v1. We assume that the transaction space is big enough and we will
not re-assign the transaction identifier too early.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther c327187259 nat: Make it possible to send MGCP messages through the IPA multiplex
Instead of handling MGCP through the UDP socket, read and write messages
through the ipa connection to the MSC.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 77956aa034 nat: Move all methods sending a response to the callagent to a single place
For testing it can be nice to handle MGCP messages through the IPA
protocol. Prepare the code to send the messages through other means.
2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 6de9d0ba35 nat: Address the FIXME and send the MDCX down to the BSC 2013-04-16 09:17:21 +02:00
Holger Hans Peter Freyther 1c0c317094 debian: Fix the installation of the sgsn example data
Creating the sgsn package failed because the debian directory has
been moved and the .examples file was not updated. This was reported
by plotr.
2013-04-05 18:43:25 +02:00
Holger Hans Peter Freyther 30156e1eea sysmobts: Add the necessary data structure and init for the SAPI queue
The sysmobts is now having a SAPI queue with all pending SAPI operations
on the BTS. Add the llist_head to the lchan and make sure it is initialized
by the shared code.
2013-04-05 18:41:45 +02:00
Holger Hans Peter Freyther d34adb2f9f nat: Fix authentication by-pass using shorter tokens
The token was compared with the configured one but only up to a
user supplied length. Compare the token sizes and then use memcmp
for the actual comparison to make sure to compare the right ammount
of characters.

There is no unit-test but there should be one.
2013-04-02 10:10:21 +02:00
Holger Hans Peter Freyther 8ae35c1606 bsc-ctrl: Fix a potential memory leak on failed verification
It was possible that the tmp was strduped but not freed, e.g. when
the number of commas was not right. It would evenutally be freed at
the time the cmd is freed thanks to the talloc hierachy.
2013-03-28 17:13:01 +01:00
Holger Hans Peter Freyther 0c908b6e72 db: Link to the VTY library for the vty_config_unlock symbol
Linking started to fail for me due the symbol coming from the
vty library and the db code not linking to it.
2013-03-21 11:12:56 +01:00
Andreas Eversberg 0c8f9ca30b Add VTY option to set GPRS network-control-order to enable MS measurements
In order to enable GPRS downlink measurements at mobile, the
network-control-order must be set to nc1.
2013-03-17 14:37:16 +01:00
Harald Welte 7159e8bea3 Fix osmo-nitb build without libsmpp 2013-03-13 15:40:14 +01:00
Harald Welte 3f78600346 SMPP: Implement SMPP Osmocom Estensions on MO-SMS
An ESME can now be configured in the VTY to enable osmocom-extensions,
which will add vendor-specific SMPP TLVs for RxLev/RxQual/ARFCN/IMEI and
transmit power to the SMPP DELIVER-SM message type.
2013-03-13 15:30:48 +01:00
Harald Welte 76afa16d04 SMPP: Fix crash on delivery of incoming SUBMIT-SM
As bsc_gsmnet is NULL at the time we call smpp_openbsc_init(),
we later run into segfaults with subscribers that don't have a
subscr->net set.

However, we cannot delay smpp_openbsc_init() until after
bsc_bootstrap_network(), as we then fail to parse the SMPP specific
VTY/config file options...
2013-03-13 15:30:48 +01:00
Harald Welte 8b29180cad IPA: Allow RSL connection to different IP address as OML
This patch adds a new VTY command "ip.access rsl-ip A.B.C.D" at the
BTS level.  If you set this IP address, the BTS will be instructed to
establish the RSL link to the indiciated IP address, rather than using
the same as for the OML link (default).

Use "ip.access rsl-ip 0" to disable the feature.
2013-03-12 13:58:30 +01:00
Andreas Eversberg 1af682adb9 BTS: Add S counter for link loss criterion to lchan structure 2013-03-11 11:50:50 +01:00
Holger Hans Peter Freyther f876c39887 si: Another round of PCS related fixes
Inside the SI1 rest_octets we will need to indicate if the ARFCN
is band 1800 or 1900. If the BTS is either 850 or 1900 we assume
we are running a PCS network, otherwise it is a DCS network.

The band indicator is not documented in GSM 04.08 but it is in the
GSM 05.14 version 6.1.0 Release 1997.
2013-03-10 17:39:50 +01:00
Holger Hans Peter Freyther e1145cf0f9 rsl: Properly initialize the cm structure with memset
abis_rsl.c:332:23: warning: 'memset' call operates on objects of type 'struct rsl_ie_chan_mode'
      while the size is based on a different type 'struct rsl_ie_chan_mode *'
      [-Wsizeof-pointer-memaccess]
        memset(cm, 0, sizeof(cm));
               ~~            ^~
abis_rsl.c:332:23: note: did you mean to dereference the argument to 'sizeof' (and multiply it
      by the number of elements)?
        memset(cm, 0, sizeof(cm));
                             ^~
1 warning generated.
2013-03-09 17:53:50 +01:00
Harald Welte e972dba8dd bsc_vty: Prevent printing -1 as unsigned integer for timeslot TSC 2013-03-08 07:45:29 +00:00
Holger Hans Peter Freyther 9b5192b153 bsc: Stop "show paging" from crashing before the first paging
The paging structure is still initialized lazily and we attempt
to traverse it before it is ready. The crash was discovered by
Katerina. Removing the lazy initialization will take a bit of work
as the gsm_data_shared is used by the osmo-bts and the OpenBSC but
paging is different.
2013-03-03 11:08:22 +01:00
Holger Hans Peter Freyther f4be327b4c doc: Do not have examples with accept-all in our repository
We do not want to tell random users to run a network with the
accept-all. This was pointed out by Katerina.
2013-03-03 09:56:25 +01:00
Holger Hans Peter Freyther 63b0e44f65 vty: Document some previously undocumented parameters
Katerina pointed out that some nodes are not fully documented and
proposed some messages. The token/timeout messages were correct, I
have modified the other messages. I removed the full-stop from the
PING/PONG documentation as we are normally not using a full sentence.
2013-03-03 09:48:20 +01:00
Holger Hans Peter Freyther 456fccf697 doc: Create a documentation on the SCCP/lite implementation we have
Describe how we handle/dispatch SCCP messages in the osmo-bsc.
2013-02-26 11:51:25 +01:00
Harald Welte b02fc1e9bb VTY: backwards compatibility for 'logging level sms'
when the SMS code was moved into libosmocore, its logging prefix was
changed from 'sms' to 'lsms', which breaks existing config files.

This introduces a deprecated/hidden vty command to make sure those
config files are still parsed OK, and will simply print a warning
message about the config needing some update.
2013-02-12 11:15:49 +01: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
Harald Welte 647db848e3 add some more docbook snippets 2013-02-07 15:03:08 +01:00
Harald Welte ce1d742f27 dump_all_docs.py: Also extract documentation for SGSN 2013-02-07 15:00:31 +01:00
Harald Welte af33e1d3a1 fix osmo-bsc example configuration file 2013-02-07 15:00:18 +01:00
Holger Hans Peter Freyther 0a7c6a3549 doc: Add some documentation on how the paging system is working 2013-02-06 12:04:32 +01:00
Holger Hans Peter Freyther 883fbc9d04 Merge branch 'zecke/feature/rf-lock-exclude'
Exclude a BTS from the RF Lock and allow MO and MT operations on
this BTS. The paging modification has been verified using the FakeBTS
and the handover test. Paging continues to work for the normal case.
2013-01-28 16:00:46 +01:00
Holger Hans Peter Freyther dc030960fc bsc: Allow to page a BTS that is excluded from the RF lock
The RF lock excluded BTS was not paged at all. Now forward the
paging message to the handler and call a function that will check
if this LAC can be paged right now. Introduce a new paging method
that allows to page on a dedicated bts, refactor the code to use
this method for paging.
2013-01-28 15:41:27 +01:00
Holger Hans Peter Freyther 3d119f1de4 bsc: A BTS excluded from the RF lock should be allowed to make a connection
When introducing the exclude for the BTS lock the RF stayed up but
all connections were immediately released. Optionally pass the BTS
as second parameter and check the exclude bit.

Tested-with: rf-lock-exclude/RFLockExcludeTest.st
2013-01-28 15:41:27 +01:00
Holger Hans Peter Freyther e30d40de0e bts: Allow to exclude a BTS from the global RF lock handling
Some BTS might be in locations where they can run all the time,
allow to exclude them from the global lock handling.
2013-01-28 15:41:26 +01:00
Andreas Eversberg e7ea08379e CC: gsm48_cc_tx_release() must not remove callref
If after release has been sent, the call control layer waits for:
- reception of release complete
- or timeout
- or release of transaction (due to radio link failure)
In this case, an MNCC_REL_CNF is sent to upper layer. The callref must
still exist, so the upper layer can handle this confirm.
2013-01-25 08:43:01 +01:00
Andreas Eversberg 1590727b64 CC: mncc_release_ind() must send MNCC_REL_CNF in state N19
If transaction is destroyed, but callref still exists, the
mncc_release_ind function is called. If the upper layer already sent an
MNCC_REL_REQ, the state N19 was entered. In this case it expects an
MNCC_REL_CNF.
2013-01-25 08:38:29 +01:00
Andreas Eversberg c5e0851054 CC: Be sure to allocate call instance with talloc_zero() 2013-01-25 08:36:32 +01:00
Harald Welte b862cef60d smpp_vty: Ensure to not print 'system-id' in openbsc.cfg if its empty
... as an empty system-id would render the openbsc.cfg unparseable on
next openbsc start.
2013-01-24 09:54:04 +01:00
Holger Hans Peter Freyther 6a85c15eea smpp: Fix a memleak of the SMS on the submit path 2013-01-20 19:21:48 +01:00