Commit Graph

515 Commits

Author SHA1 Message Date
Holger Freyther b424ecb247 crypt detection: Make autoheader happy
Use AC_DEFINE([WHAT], [],[Description]) to make autoheader happy
again and autoreconf --install --force succeed.
2009-06-08 10:32:28 +00:00
Holger Freyther eaf0469a8b gsm_04_08.c: Some spoofing protection against two location updating requests
Do not allow two location updating requests on the same lchan. Such
an event is certainly spoofed and can confuse the internal logic of
the application. Prevent that.
2009-06-06 13:54:44 +00:00
Holger Freyther 7c19f74084 lchan: Handle the abnormal case of channel getting closed
The abnormal case is that lchan_free ist getting called due
a RSL_MT_CHAN_REL_ACK in the RSL but the refcount of this
channel is not zero. This means that some "logical operation"
is still going on that needs to be cancelled.
Instead of always queuing up all operations in the
struct gsm_lchan use the signal framework to inform higher
layers about this abnormal case.

In gsm_04_08.c a signal handler is installed and in the
abnormal case the location updating request operation is
freed.
2009-06-06 13:54:35 +00:00
Holger Freyther c7b86f9011 Revert "[db] Keep track of the current gsm_network"
This was a stupid decision. We will have to assign the
network at some other place. The problem will be a problem
when we have two gsm_networks in one process and the same
subscriber is traveling in both networks.
2009-06-06 13:54:20 +00:00
Holger Freyther 535abf2f40 [tests] Do no free objects that are allocated on the stack
gcc4.4 warns about these kind of objects. Fix that.
2009-06-06 13:54:02 +00:00
Harald Welte 9d12ea0e47 fix CONN FAIL and IPAC_DISCONNECT_IND log printing 2009-06-05 20:28:48 +00:00
Harald Welte d2a7f5a7b2 print reject cause of MM STATUS message 2009-06-05 20:08:20 +00:00
Harald Welte 60d68f1974 missing newline in log message about measurement result 2009-06-05 20:07:43 +00:00
Harald Welte 30b66d79cd fix printing of measurement results 2009-06-05 19:57:24 +00:00
Harald Welte 8b697c74c7 BS11: add nm_state for EnveBTES, PA and BBSIG physical objects 2009-06-05 19:18:45 +00:00
Holger Freyther c3d4b2d441 [subscr] Remove the struct gsm_bts pointer from subscriber
The pointer was initially added to support to open a lchan
by using the gsm_subscriber structure. We would have restored
the struct gsm_bts from the db when loading the subscriber.

Instead we will dynamically resolve the gsm_bts and might end
up paging multiple bts in the same (stored/old) location area
until it answers.
2009-06-04 14:27:39 +00:00
Holger Freyther 862cfff609 gsm_subscriber.h: Remove trailing whitespace...
Cosmetic changed
2009-06-04 14:15:33 +00:00
Holger Freyther eb443983ae [debug] Move subscr_get_by_tmsi below the debug statement (Andreas Eversberg)
subscr_get_by_tmsi might log as well and then the order of
debugging it not as clear as it could be.
2009-06-04 13:58:42 +00:00
Holger Freyther 2e99605b7e [misc] Search for the crypt symbol to conditionally enable crypt in VTY
It will define -DVTY_CRYPT_PW= if crypt is found. If -lcrypt is
needed, $(LIB_CRYPT) will be -lcrypt.

Compiles on OS X and Linux and reenables crypt.

Patch by: Lars Immisch
2009-06-02 04:04:36 +00:00
Holger Freyther 8521e5f050 [l2] Do not always release the layer2 when closing the socket (Andreas Eversberg)
Tells mISDN not to release layer 2 on closing socket, when not
requested. If mISDN was told to release layer 2 once, it will continue
to release layer 2 on every shutdown of OpenBSC.
2009-06-02 03:25:24 +00:00
Holger Freyther b8be6543cd [e1] Correctly initialize the e1link (Andreas Eversberg)
During bootstrap of BS11, the e1links are initialized. This must also be
done when BS11 is already bootstrapped (when restarting OpenBSC). It is
required to correctly multiplex the audio traffic between channels.
Without it, all time slots refer to card 0, slot 0, subslot 0, which
causes crashes when handling TRAU frames..
2009-06-02 03:25:14 +00:00
Holger Freyther 79f4ae6cc3 [debug] Change DEBUGPC statements to contain \n (Andreas Eversberg)
Some debug outputs now correctly use end-of-line characters.
2009-06-02 03:25:04 +00:00
Holger Freyther 213b20bec0 [subscriber] Change id to long long unsigned int (Andreas Eversberg)
Changes the subscriber id type defintion from "long unsigned int" to "long
long unsigned int". Without, printf with '%llu' caused a crash.
2009-06-02 03:24:54 +00:00
Holger Freyther f7b2a0ec7f [rsl] Change logging of handling reason 0x18 in rsl_rx_conn_fail (Andreas Eversberg)
Release the channel when it is not used, otherwise claim it
is still in use...
2009-06-02 02:55:17 +00:00
Holger Freyther 4f584c3d4b [lchan] Log increase/decrease of channel use count (Andreas Eversberg)
This is part of patch 22 and will log changes in the usecount
of the lchan.
2009-06-02 02:55:07 +00:00
Holger Freyther c21cfbc4aa [subcriber] Fix the subscriber use counting in gsm_04_08.c (Andreas Eversberg)
This patch will fix subscriber usage countinig.
It may happen, that the subscriber count will not be 0 after releasing
of a call. (This problem is solved with the application patch (27),
which will replace static call transaction by a dynamic transaction
list, and use subscriber for each transaction created.)
2009-06-02 02:54:57 +00:00
Holger Freyther 3e0ef7ccbe [subscriber] Log changes in the usage of a subscriber (Andreas Eversberg)
Log changes of the use count of a gsm_subscriber.
2009-06-02 02:54:48 +00:00
Holger Freyther 6d5200b217 [subscriber] Update the lac entry in subscr_update (by Andreas Eversberg)
This is coming from patch 16 and is one of the two changes. When
invoking subscr_update update the lac entry as well.
2009-06-02 02:54:38 +00:00
Holger Freyther 3770b763bc debug: Fix the definition on DMM (Andreas Eversberg)
Now MM can be specified on the command line with the debug option.
2009-06-02 02:35:12 +00:00
Harald Welte 7b26bcb1b5 * give Siemens ObjClass reasonable names rather than A3/A5/A6
* add nm_state objects for RACK and CCLK
* add obj_class human-readable printing for all vendor obj_classes
* add human-readable printing of administrative state
* add enum for cell_alloc numbers
2009-05-28 11:39:21 +00:00
Harald Welte fe609d85c3 some more comments on the abis attributes 2009-05-23 18:14:31 +00:00
Harald Welte 060f6dfced make sure even our predefined structures use HARDCODED_BSIC as initial value 2009-05-23 17:50:53 +00:00
Harald Welte 40f828936f show and edit subscribers from the vty interface 2009-05-23 17:31:39 +00:00
Harald Welte be4b730196 mark two functions as static, fix typo in vty message 2009-05-23 16:59:33 +00:00
Harald Welte 78f2f508e6 Add user-configurable BSIC setting 2009-05-23 16:56:52 +00:00
Harald Welte 110c0ab6c5 * replace some more hex bytes in init msgs by #defines
* when using patch_tables(), use the ARFCN of the BTS, not the cmdline argument
2009-05-23 16:27:05 +00:00
Harald Welte 45b407ad25 With this patch, the TRAU muxing code supports not just bridging only.
A new function trau_recv_lchan() is used to link a channel to a call reference
of a transaction. (Transactions are used in later patches.) TRAU frames will
then be forwarded to the application with the given call reference (in later
patches). Also the application can send TRAU frames by using trau_send_lchan().

A new list is introduced in trau_mux.c. (upqueue_entry) All subslots
that must be sent to application are listed here.

Received TRAU frames are written in the upqueue of application
interface, if a call reference is found in the upqueue-list. If an entry
is found the ss_entry list, the TRAU frames are bridged as before. The
frames have a message type (msg_type), a call reference (callref) and a
trau frame (data). The length of trau frame is defined by the content of
the c-bits inside the frame.

There is no support for ip.access yet, as they don't use the traditional
TRAU frame format. Harald must add this in order to use application interface
with ip-access. The bridging with ip-access works as before.
(Andreas Eversberg)
2009-05-23 15:51:12 +00:00
Harald Welte be99149e72 add new function gsm_bts_by_lac() to search for BTS based on location area 2009-05-23 13:56:40 +00:00
Harald Welte c1d2aaecb5 RSL should not be called RSSL in the debug definition (Andreas Eversberg) 2009-05-23 06:43:35 +00:00
Harald Welte c125a680ef A new debug flag is introduced: "DMNCC". MNCC is the Mobile Network Call
Control. This is required for later patches, that extract the call
control from gsm_04_08.c. (Andreas Eversberg)
2009-05-23 06:42:38 +00:00
Harald Welte a4d49e96ab Some messages have one or two length-value information elements. The is
no IE type included in the message. These information elements are
mandatory, so their actual IE type is known. The improved parse_tlv()
function allows to parse zero, one, or two length-value elements.
(Andreas Eversberg)
2009-05-23 06:39:58 +00:00
Harald Welte e7b452a7a0 add FIXME comment about the fact that we're paging in the wrong BTS 2009-05-23 06:34:37 +00:00
Harald Welte f55b49fef3 To slow down transmission of many ABIS frames at a time, a delay timer
is used for the E1's time slot. This timer replaces the "usleep()"
function, so the process will not block the execution of libbsc. The
timer is started after a frame is transmitted. If another frame is in
the transmit queue, the frame will only be queued until the timer times
out. If the timer is not running or times out, the frame is transmitted
and the timer is restarted.

The problem with partly provisioned TRX (locks show on LMT) is solved.
The adjustment for the inter frame delay of 50 miliseconds is for
further study.
(Andreas Eversberg)
2009-05-23 06:20:41 +00:00
Harald Welte 703af9887d fix some more compiler warnings 2009-05-23 06:14:44 +00:00
Harald Welte 75d34a8b3d fix two compiler warnings 2009-05-23 06:11:13 +00:00
Harald Welte 04d3c9224f An application that has own events and file descriptors, must poll
select function ob libbsc. A "polling" flag is used to enable polling.
In this case select() will not sleep until file descriptor events occurr
or nearest timer expires. Also a return value will indicate if there was
an event that has been handled. If there was an event, the application
decides to poll again and don't wait.

In case for bsc_hack, the polling flag is not set. select will sleep as
usual.

(Andreas Eversberg)
2009-05-23 06:07:04 +00:00
Harald Welte 7d14476a6e Correct handlong of data link status change (Andreas Eversberg) 2009-05-23 05:40:49 +00:00
Harald Welte 7572745816 Add missing "extern" prefix (Andreas Eversberg) 2009-05-23 05:26:29 +00:00
Harald Welte be68f6fc6c Change the variable "new" to "_new" in order to include it from C++ code.
The define "container_of" will cast pointer before assigning. Compilers
with stricter options require this. (Andreas Eversberg)
2009-05-23 05:24:48 +00:00
Harald Welte ff117a8d11 * rename the timer functions to avoid name collisions with libmisdn.
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired
(Andreas Eversberg)
2009-05-23 05:22:08 +00:00
Harald Welte d6cab81175 vty: disable password encryption, remove dependency to lcrypt 2009-05-21 07:31:48 +00:00
Harald Welte 12247c6713 Fix compilation issues on OS X - mainly #include file changes (Lars Immisch) 2009-05-21 07:23:02 +00:00
Harald Welte ef061951e6 dump CCLK accuracy/type as part of bs11_config query 2009-05-17 12:43:42 +00:00
Harald Welte 7a2a71e255 revert commit #481: we actually still need that stupid usleep() to reliably bootstrap nanoBTS :( 2009-05-01 21:54:11 +00:00
Harald Welte c9e0218990 Fix "CM Service Request" parsing for Phase 1 devices. This means MO calls from phase1 should work now. 2009-05-01 19:07:53 +00:00