path: root/openbsc/src/gprs
AgeCommit message (Collapse)AuthorFilesLines
2010-12-26HACK / unfinished: persistent storage of SGSN statelaforge/gprs_persistentHarald Welte2-0/+106
2010-12-26[SGSN] Fix processing of RA Update Request regarding TLLIHarald Welte2-1/+27
In case we get a RA UPD REQ on a new cell (both served by the same SGSN), the LLC stack should not allocate a ne LLE/LLME, as the latter would reset the V(u)sent / V(u)recv to zero and make the MS discard our responses. Instead, whenever the LLC stack sees a foreign TLLI, it should always convert it to the local TLLI before doing any lookup for a LLE/LLME.
2010-12-24SGSN / GMM: Only allow non-roaming IMSIsHarald Welte1-1/+10
As we do not yet use the HLR from the SGSN, we allow all MS to attach to our GPRS network. However, if this is running in a public environment, it could cause service interruption to users of commercial GPRS networks. Thus, we now check if the first 5 digits of the IMSI match the MCC/MNC of the cell that they want to register to. Thus, any subscribers with SIM cards from real operators will no longer be accepted.
2010-12-23GPRS/GMM: Correctly look up MM Context in RA UpdateHarald Welte2-1/+19
If a MS changes RA, the RA will arrive in the new cell using the old TLLI (masked as foreign TLLI). So we need to look-up the TLLI in a special way, using the old RA as indicated in the 04.08 GMM message. There is still another bug remaining: As we somehow create a new LLC, the sequence numbers of our responses start from 0 again, which is not what the MS expects. This needs to be fixed in a follow-up patch.
2010-12-12Add mandatory routeing area IE to SUSPEND-NACKDieter Spaar1-1/+5
2010-11-15misc: Introduce a --enable-coverage mode to build with gprof coverageHolger Hans Peter Freyther1-2/+2
This adds a test coverage build. One can use gcov and lcov on the resulting data afterwards to see which code paths were executed and which were not.
2010-10-06misc: Once again go from "On Waves" to "On-Waves"..Holger Hans Peter Freyther4-4/+4
Try to get the company name of our sponsor right...
2010-09-11vty: Use \r\n in the copyright messagesHolger Hans Peter Freyther2-8/+8
We should use VTY_NEWLINE but our strings are static, always use \r\n as unix terminals can handle that as well.
2010-09-04vty: Add the config node code to everyone.Holger Hans Peter Freyther2-0/+2
2010-08-27[gprs] Add option parsing to SGSNHarald Welte1-1/+75
2010-08-25Introduce '-D' commandline option to daemonize processesHarald Welte1-1/+16
This uses the osmo_daemonize() function of libosmocore >= 0.1.18, and is now implemented for bac_nat, osmo-bsc, bsc_hack, osmo-gbproxy and bsc_mgcp. This means only osmo-sgsn is missing, which currently has no option parsing at all.
2010-08-24Add gprs_sndcp.h to noinst_HEADERSHarald Welte1-0/+1
2010-08-09[GPRS NS] Fix memory leak in gprs_ns_sendmsg() error pathHarald Welte1-0/+4
When gprs_ns_sendmsg() succeeds in sending the message, we free()d the msgb after transmitting it on the socket. However, if the NS-VC is blocked or some other error condition exists, we returned an error code but didn't free the msgb. This resulted in an error leak which is now being addressed.
2010-07-23[gprs] BSSGP: Fix null pointer dereferenceHarald Welte1-2/+3
Zecke has found this using "make CC="clang --analyze"
2010-07-03gprs/llc: Don't check FCS in gprs_llc_hdr_dumpSylvain Munaut1-2/+2
The FCS isn't computed yet (because of ciphering). It _will_ be tested and reported as wrong later in the code so we can just display it here and let the latter code report the error if any. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-03[SGSN] Some IEs in ATTACH REQUEST can be longer in 24.008Harald Welte1-1/+3
The original length checks were based on 04.08, but 24.008 allows longer IEs.
2010-07-03[SGSN] Initial work on GMM authentication and cipheringHarald Welte1-9/+103
2010-07-02[SGSN] LLC: only copy Kc if algorithm != GPRS_ALGO_GEA0Harald Welte1-1/+2
The caller currently has set the Kc pointer to NULL, this fix avoids crashing at the callee.
2010-07-02[SGSN] use GPRS_ALGO_GEA0 instead of '0'Harald Welte1-6/+11
2010-07-02[SGSN] LLC: Make sure we calculate FCS after decryptionHarald Welte1-10/+5
2010-07-02[SGSN] Use libosmocore GPRS encryption plugins from LLC layerHarald Welte1-8/+88
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 Welte2-0/+8
2010-07-02[SGSN] remove bogus debug statementHarald Welte1-1/+0
2010-07-02[SGSN] SM: Properly parse APN and PCO Optional IE in PDP CTX ACT REQHarald Welte1-2/+8
2010-07-02[SGSN] Print AP name and PDP address of each PDP contextHarald Welte1-1/+70
2010-07-02[SGSN] Correctly pass IMSI of MM ctx to GTP/GGSNHarald Welte1-1/+27
2010-07-02[SGSN] SNDCP: Subtract SNDCP header from fragment lengthHarald Welte1-2/+3
We don't want to store too many bytes as we would otherwise create too large re-assembled packets..
2010-07-02[SGSN] SNDCP: SN-PDUs need a 16bit length fieldHarald Welte1-1/+2
The BSSGP LLC-PDU IE can have up ot 16bit length, so subtracting the LLC header the SN-PDU can still have almost a length field close to 0xffff
2010-07-02[SGSN] SNDCP: re-set total number of fragment lengthHarald Welte1-1/+7
2010-07-02[SGSN] Send poper SM and GMM STATUS in case we have no MM CTXHarald Welte1-1/+2
2010-07-02[SNDCP] some more defragmentation debug statementsHarald Welte1-11/+9
2010-07-02[SGSN] SNDCP defrag: use correct length, don't include LLC FCSHarald Welte1-3/+4
The LLC layer tells us the PDU length, and we have to use it in SNDCP rather than to re-calculate it if we want to avoid copying the CRC24 into the defrag elements.
2010-07-02[SGSN] SNDCP: Actually copy the payload data in the defrag queue entryHarald Welte1-0/+2
Prior to this patch our defragmented messages always consisted of 00-bytes
2010-07-02[SGSN] Remove old dead codeHarald Welte1-17/+14
2010-07-02[SGSN] Only increment PDP CTX ACT count after check for retransmissionHarald Welte1-2/+4
2010-07-02[SGSN] Account for re-transmitted PDP CTX ACT REQHarald Welte1-2/+11
In case our PDP CTX ACT ACK gets lost on the Gb or Um link, the MS re-transmits the PDP CTX ACT REQ. We have to ACK it again instead of REJecting it..
2010-07-02[SGSN] SNDCP: Fix off-by-one error missing last segment in defragHarald Welte1-1/+1
When we defragment the segments from the defrage queue, we have to iterate all the way up to (and including) the last segment number that we have received.
2010-07-01[SGSN] SNDCP: more verbose defragmentation debuggingHarald Welte1-2/+8
2010-07-01[SGSN] Fix segfault when passing re-assembled SN-PDU to GMMHarald Welte3-8/+10
sgsn_rx_sndcp_ud_ind() can no longer make the assumption that msgb_bcid() is valid, as this is only true for an un-fragmented SN-PDU. So instead, we now store the RAID in the SNDCP Entity and pass it as an explicit argument to sgsn_rx_sndcp_ud_ind().
2010-07-01[SGSN] SNDCP: fix off-by-one error during defragmentationHarald Welte1-1/+1
2010-07-01[SGSN] SNDCP: Initialize defrag list headerHarald Welte1-0/+1
2010-07-01[SGSN] GMM: Complete value_string for GMM cause valuesHarald Welte1-4/+21
2010-07-01[SGSN] SNDCP: use llist_for_each_entry_safe() when cleaning frag queueHarald Welte1-2/+2
2010-07-01[SGSN] Fix TLLI (re)assignmentsHarald Welte2-16/+21
Once The TLLI (or P-TMSI of which it is derived) change has been confirmed by the MS, we need to unassign the old TLLI but keep the new TLLI _without_ re-setting the LLC entity structure such as VUsend /VUrecv counters.
2010-07-01[SGSN] Fix segfault when doing PS PAGINGHarald Welte1-1/+1
The 'bssgp_paging_info' contains a pointer to the P-TMSI, and not the P-TMSI itself. The reason is that it is an optional BSSGP IE.
2010-07-01[SGSN] Add VTY interface for SNDCPHarald Welte5-68/+159
2010-06-30[SGSN] BSSGP: Print TLLI as hex value like everwhere elseHarald Welte1-1/+1
2010-06-28[SGSN] Deactivate SNDCP entity on PDP CTX DEACT CONFIRMHarald Welte1-0/+3
Otherwise we will end up leaking memory in the SNDCP layer...
2010-06-28[SGSN] MM: Properly communicate TLLI changes / unassignment to LLCHarald Welte1-3/+9
2010-06-28[SGSN] LLC: properly free LLC entities at TLLI unassignmentHarald Welte1-0/+7