aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gprs_llc.h
AgeCommit message (Collapse)AuthorFilesLines
2015-01-26sgsn: Remove inactive LLME/MM after inactivity timeoutJacob Erlbeck1-0/+5
Currently old LLMEs and MM contexts that haven't been explicitly detached or cancelled are not removed until another request with the same IMSI is made. These stale entries may accumulate over time and severely compromise the operation of the SGSN. This patch implements age based LLME expiry, when the maximum age has been reached, the corresponding MM context is cancelled. If such an MM context doesn't exist, the LLME is unassigned directly. The implementation works as follows. - llme->age_timestamp is reset on each received PTP LLC message - sgsn_llme_check_cb is invoked periodically (each 30s) - sgsn_llme_check_cb sets the age_timestamp to the current time if it has been reset - sgsn_llme_check_cb computes the age and expires the LLME if it exceeds gprs_max_time_to_idle() Ticket: OW#1364 Sponsored-by: On-Waves ehf [hfreyther: Fix typo in comment LMME -> LLME]
2014-10-27sgsn: Send detach(re-attach) instead of gmm status if TLLI unknownJacob Erlbeck1-0/+1
The osmo-sgsn sends Status messages (or nothing in case of non GMM/GSM) when the TLLI is unknown. This prevents the MS from reconnecting. This patch adds the initiation of an MT detach procedure to force a re-attach to set up a valid LLE context if an LLE or an MM context cannot be found. Since this can also be triggered by non-GMM SAPI messages, a GPRS application callback sgsn_force_reattach_oldmsg is added which in turn calls the GMM layer to generate the GSM 04.08 specific messages. Note that the MS can be left in REGISTERED state after initially wanting to detach itself, since it will receive a Detach Req (re-attach) when sending a DEACT PDP CTX REQ after the SGSN or gbproxy (P-TMSI patching enabled) has been restarted. This same behaviour has been observed with another SGSN. Sponsored-by: On-Waves ehf
2014-10-09sgsn: Create testcase that verifies that llmes get deletedHolger Hans Peter Freyther1-0/+6
On an "unassignment" this code verifies that the LLME will vanish from the list of LLMEs. We assume that this doesn't create a memory leak.
2014-06-04gprs: Separate LLC parsing from LLC state handlingJacob Erlbeck1-0/+41
Currently LLC parsing is part of gprs_llc.c which needs large parts of the SGSN code parsing to fulfill its link dependencies. This patch moves the functions that just do plain parsing, dumping, and FCS computation to a different file to avoid these dependencies if LLC stateful processing is not needed. It also exposes struct gprs_llc_hdr_parsed and enum gprs_llc_cmd publically. Sponsored-by: On-Waves ehf
2013-06-21GPRS LLC: Add non-standard method of sequence number recoveryHarald Welte1-0/+4
In some situations (like MS reboot without prior DETACH or SGSN reboot without prior MS detach), the LLC sequence numbers for UI mode could be different on both sides. The LLC spec unfortunately doesn't permit us to send something like a FRMR in this case, but instructs us to silently discard the frame. At that time the remote LLC entity will re-transmit the frame with the same seqeunce number over and over again, which we will drop again and again. The mthod used now will keep track of the last received UI sequence number. If that number is retransmitted for three times in a row, then we accept this sequence number and recover from that point on.
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther1-0/+16
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known, or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have V(UR) == 511 and this frame is dropped, we would ignore N(U)'s 0 to 510. Calculate the delta. The code is based on Jonathan Santos's "LLC UI window" fix but the issue was discovered independly.
2011-10-16LLC: Add minimal LLGMM-RESET.req implementationHarald Welte1-0/+20
Using LLGMM-RESET.req, the GMM can request the LLC of the MS to reset all its parameters, particularly the sequence numbers. We don't yet do XID RESET retransmissions, and we don't yet generate a LLGMM-RESET.conf primitive back to GMM.
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-2/+2
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2010-07-02[SGSN] Use libosmocore GPRS encryption plugins from LLC layerHarald Welte1-0/+12
This adds the bits that call into libosmocore (and its plugins) to implement GPRS (LLC) encryption.
2010-07-02[SGSN] Call libosmocore helper to load cipher pluginsHarald Welte1-0/+1
2010-06-03[GPRS] LLC: Implement per-SAPI default values for LLC parametersHarald Welte1-1/+15
2010-06-01[GPRS] Major LLC / TLLI handling fixesHarald Welte1-14/+38
* separate the LLME and LLE state in the LLC layer * introduce gprs_llgmm_assign() function for LLGMM-ASSIGN.req primitive * change QoS profile to match 'real' SGSN * Update the new TLLI when assigning a P-TMSI The result now is that the LLC layer is notified of TLLI changes, which in turn means it doesn't allocate a new LLE structure every TLLI change, which again in turn means that the UI frame sequence number does not reset to zero. As a result, MS should no longer ignore frames based on wrong UI sequence number.
2010-05-31[GPRS] Include IMSI and DRX params in BSSGP DL-UDHarald Welte1-1/+2
When we send a downlink unit-data request via BSSGP, there is a lot of information that needs to be copied from the mm context, such as the IMSI, DRX parametes, MS radio access parameters, ... This is a quite strange layering violation, since we now need to pass a pointer to the MM ctx from GMM through LLC into BSSGP :(
2010-05-30[GPRS] LLC: Increment V(U) and N(U)Harald Welte1-3/+6
2010-05-18[GPRS] LLC: Add VTY interface for LLCHarald Welte1-0/+39
2010-05-13[GPRS] LLC: Improve implementation compliance to specHarald Welte1-0/+36
Don't allocate a LLC Entity just because BSSGP passes any random SAPI/TLLI up to us. We can only do this for XID and UI frames of the GMM SAPI. Furthermore, add more comments and debug messages.
2010-05-04[gprs] LLC: API to send XID responses to XID commandsHarald Welte1-0/+10
2010-05-04[gprs] Use stdint.h types (uintXX_t instead of u_intXX_t)Harald Welte1-1/+3
libosmocore already uses them, it's time (at least for new code) in openbsc to do the same.
2010-05-04Create new 'gprs-sgsn' branch on top of 'gprs-conf'Harald Welte1-0/+20
This branch contains the partial SGSN/GGSN implementation that was originally developed as part of the gprs branch.