Commit Graph

2517 Commits

Author SHA1 Message Date
Harald Welte 43ef6483db [SGSN] BSSGP: Print TLLI as hex value like everwhere else 2010-06-30 09:01:35 +02:00
Holger Hans Peter Freyther d9c9f07c2c handover: lchan_free will only free the local resources.
lchan_free only free's the local resource of the BSC but
does not release the channel at the BTS. Use lchan_release
to properly release the channel. This code assumes that the
timeout happens after a CHAN ACT ACK/NACK otherwise we have
some problems. The comment indicates that this is the case.
2010-06-30 13:04:13 +08:00
Holger Hans Peter Freyther f2553a6c3a handover: Call bsc_handover_clear from gsm0808_clear
The bsc_handover_clear will release an in-progress handover
and free the lchana and the data associated with this handover
2010-06-30 13:02:08 +08:00
Holger Hans Peter Freyther 0610947f4c misc: Move handover_logic.c into the libbsc.a
We are implementing the intra BSC handover so we should have the
code in the BSC as well.
2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther 88519eaaef msc: Add includes to silence a compiler warning. 2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther e071ab70e9 handover: Attempt to use the same gsm_subscriber_conn for new/old channel
The transaction should not know on which lchan we are operating
as this can change due handover. Add untested code to share the
subscriber connection of the new and old lchan and move the pointer
in case of success/failure. Also on a clear command we will free
any resources allocated...

This code is not tested and needs to be debugged, but it should
have the right structure. I am going to fix a potential memleak
in the next commit.
2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther d06516557a bsc_api: Avoid use after free kind of error on the lchan. 2010-06-30 12:17:35 +08:00
Holger Hans Peter Freyther 2486663844 ussd: Release the MSC connection as fast as possible.. 2010-06-30 12:15:19 +08:00
Holger Hans Peter Freyther 0379c6d386 abis_rsl: Add full MA again until we are confident to remove it
The spec seems to say we do not need to include the full MA,
even for Phase1 phones but that is not so clear...
2010-06-30 12:06:20 +08:00
Holger Hans Peter Freyther e38bd6caa3 abis_rsl: Change code to generate Channel Identification
1.) memset the gsm48_chan_desc to avoid sending dummy data
2.) According to the GSM08.58 9.3.5 the Mobile Allocation
    shall be included but the empty (by setting the length
    to zero).
3.) use msgb_tlv_put and calculate the length via the l3h
    msgb_l3len and assign it.
2010-06-30 12:01:22 +08:00
Holger Hans Peter Freyther 06abe9f383 ussd.c: Make sure text is memset to zero..
Make the strstr fail fast, make sure the text is null terminated...
2010-06-30 11:59:30 +08:00
Holger Hans Peter Freyther 66efcbce65 gsm_subscriber_base: Take a ref on the subscriber to avoid use after free
On expired paging we might access a GSM Subscriber that has already
been deleted. To avoid this we will add a subscr_get/subscr_put for
the subscriber to the allocation and release path of the request.

Reported-by: Richard Zahoransky
2010-06-30 11:59:29 +08:00
Harald Welte 93d50e69d3 [BSC] RSL: CHAN ACT: Only include MA if TS is hopping 2010-06-29 17:53:45 +02:00
Harald Welte 8fc60f0eb5 [SGSN] Deactivate SNDCP entity on PDP CTX DEACT CONFIRM
Otherwise we will end up leaking memory in the SNDCP layer...
2010-06-28 22:21:57 +02:00
Harald Welte bd5c91276b [SGSN] MM: Properly communicate TLLI changes / unassignment to LLC 2010-06-28 22:18:53 +02:00
Harald Welte f7fef48e1b [SGSN] LLC: properly free LLC entities at TLLI unassignment 2010-06-28 22:18:26 +02:00
Harald Welte c0d59504b4 [SGSN] Deactivate all PDP contexts on GPRS DETACH 2010-06-28 19:11:41 +02:00
Harald Welte 376d5e521e [SGSN] Fix segfault ar PDP CTX DEACT time
We need to call rate_ctr_group_free() on the per-PDPctx-counters
2010-06-28 18:57:21 +02:00
Harald Welte a1d39a2a11 [BSC] fix off-by-one error in computing l2 pseudo-length in IMM ASS
@fingerprint:
This caused Motorole EZX phones (Neptune LTE chipset) to discard
all immediate assigns and thus be unable to perform location updating.
2010-06-28 18:41:27 +02:00
Harald Welte 0f43dbcfc6 [ipaccess-config] Better way to set/unset NVRAM attributes
there are now human-readable names so you can do something like

ipaccess-config -U dhcp-enabled -S static-ip -S static-gw 192.168.100.120

to unset DHCP and to set static IP and gateway attributes.
2010-06-28 15:52:56 +02:00
Harald Welte 0aef73efc4 [ipaccess-config] Enable setting of static IP address / netmask / gateway
However, the 'static IP address' NVRAM flags are not yet set correctly
2010-06-28 15:18:17 +02:00
Harald Welte 8c21c07a65 [ipaccess-config] use msgb to make use of various tlv put functions
This looks so much better than the *cur++ type code.

Also, we now terminate ipaccess-config once the NV flags or Unit ID have
been set, not just for the OML IP address.
2010-06-28 14:41:09 +02:00
Holger Hans Peter Freyther ed83286950 gsm_data.c: Reorder includes to put osmocore up 2010-06-28 18:20:22 +08:00
Holger Hans Peter Freyther 4049455d74 bsc_msc: Remove use_count from the subscriber connection
A channel will be released in case of
    * Errors via the clear_request callback...
    * no more transactions and operations are going on.

This means that if we do something without a transaction
the channel might be closed down right away. The bug fix
will be to create a transaction/operation.
2010-06-28 18:01:47 +08:00
Holger Hans Peter Freyther 2412a07965 bsc_api: Allocate the subscriber_connection dynamically
This is a big change to the way we use the subscriber
connection. From now on it is is dynamically allocated
and we will slowly move from a 1:1 lchan to conn to
having more than one lchan per connection.

This is the first commit, the subscr_con* methods will
move to gsm_data once the use_count is removed from the
connection, the freeing of the connection will also change.
2010-06-28 16:12:39 +08:00
Holger Hans Peter Freyther 94d625bfa0 Revert "bsc_api: Move debug context for subscriber into the bsc_api.c"
This is breaking the filtering for the Measurement Report case, revert
the patch for now.

This reverts commit 69e8f8285b.
2010-06-28 13:38:19 +08:00
Harald Welte 9d4cca7a0e [BSC] Enable the use of whitespaces in the subscriber name
This patch (originally by Luca Bertoncello) adds support for spaces
in the subscriber name when specified from the VTY.
2010-06-24 08:06:38 +02:00
Holger Hans Peter Freyther 2788b96bf4 gprs: Fix LOGP misuse and specify LOGL_NOTICE as region. 2010-06-23 09:48:25 +08:00
Holger Hans Peter Freyther f7a1c23e1d lchan: Document why lchan_reset is there... at least try to. 2010-06-22 12:26:35 +08:00
Holger Hans Peter Freyther 5ba05f4d26 abis_rsl: Send the IMMEDIATE Assignment after the Channel Ack.
The Channel Activate might be sent to a different TRX than the
Immediate Assignment. So we need to make sure that the channel
is activated before we send the immediate assignment for the RACH.

Another reason for that is according to GSM 08.58 we should take
the frame number from the activate and use it for the starting
time inside the immediate assignment message. We obviously do not
do this yet.

The code assumes that the BTS will either respond with a CHAN ACK
or a CHAN NACK if not the lchan will remain in the request state.
2010-06-22 12:26:35 +08:00
Nico Golde 4df2ad9ac6 [SMS] avoid mktime on NULL
gmtime(NULL) returns NULL at least in glibc and *can not* be used as
time(NULL). Since we compare two time_t values when checking the validity
period this can be replaced by time(NULL)
2010-06-21 13:51:28 +02:00
Holger Hans Peter Freyther c8bf3c178f misc: make the compiler happy...
The compiler treats uint8_t*[] and uint8_t* differently,
use the address of the first element and assign that.
2010-06-21 18:21:16 +08:00
laforge cfa4a01c8f [RSL] hopping: Set correct L2 pseudo-length during IMMediate ASSign
Thanks to Sylvain for the hint that lead to this fix.
2010-06-21 12:09:41 +02:00
Holger Hans Peter Freyther a69d923fd7 bsc_api: Use conn->bts directly... 2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther 69e8f8285b bsc_api: Move debug context for subscriber into the bsc_api.c 2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther db4ef0d369 bsc_api: Remove the lchan usage from the Paging Response handling. 2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther 758f4dfa17 silent_call: Use the gsm_subscriber_connection instead of lchan->conn 2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther 1afbd76155 abis_nm.c: Reading the in_addr can lead to unaligned memory access
The value of the in_addr might not be 32 bit aligned and reading
it can generate an alignment error on ARM. Fix it by using memcpy
to copy the data into a local variable.

There are many more potential alignment issues that we will fix
when we hit them.
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther 34949ae924 bsc_init: Avoid unaligned access to nanobts_attr_nsvc0
nanobts_attr_nsvc0 + 10 is unlikely to be 32 bit aligned
and will trigger an alignment error on ARM..
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther ad98128e65 configure.in: Require a newer libosmocore. 2010-06-21 16:40:09 +08:00
laforge 694a5cfe06 [BSC] RSL: Fix Channel Identification IE in RSL CHAN ACT
We now not only include the 04.08 channel description but also
the 04.08 Mobile Allocation nested IEs
2010-06-20 21:55:23 +02:00
Harald Welte 9575fd0732 [BSC] add example hopping config file for BS-11 in 2TRX config 2010-06-20 16:08:36 +02:00
laforge abeb951426 [BSC] Fix off-by-one error in computing mobile allocation 2010-06-20 15:56:50 +02:00
laforge f87ebe69d5 [BSC] NM: Correct treatment of ARFCN_LIST for BS-11
For Siemens BS-11, the 'length' value of the ARFCN_LIST IE is interpreted in
violation of the spec.  The spec says it is a length in octets, while Siemens
treats it as 'count of 16bit ARFCN values'.
2010-06-20 15:20:02 +02:00
laforge 09108bff95 [BSC] RSL: properly include MA in IMM ASS CMD
When we build an IMMediate ASSign CoManD for a hopping channel,
we need to include the length of the MA in the total length of
the 04.08 message
2010-06-20 15:18:46 +02:00
Harald Welte c8794b5977 [BSC] SI: make sure we initialize the data field, not the bitvec structure 2010-06-20 10:44:54 +02:00
Harald Welte 9da921b8b0 add more executables to .gitignore 2010-06-20 10:44:54 +02:00
Harald Welte 29aca17ed0 [BSC] Hopping: Add MA IE to ASS CMD, IMM ASS CMD and HO CMD
Also, make sure the bit ordering in the pre-computed MA is correct,
as well as the cell channel description of the target cell being
present in the HO CMD.
2010-06-20 10:44:53 +02:00
Harald Welte 7401ae6a79 [BSC] Keep a SYSTEM INFORMATION cache for each BTS
This will later be useful for handover where we need to copy the cell
channel allocation into a normal 04.08 message
2010-06-20 10:44:53 +02:00
Harald Welte fd3708976a [BSC] Generate MA for each timeslot that has hopping enabled
The MA is used in 04.08 channel assignment related messages
2010-06-20 10:44:53 +02:00