aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
AgeCommit message (Collapse)AuthorFilesLines
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck2-6/+2
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-07-31gprs_gmm: Avoid assertion in the sending code during routing area updateHolger Hans Peter Freyther1-1/+1
Use old and new tlli as specified by the caller. WIP <000f> sgsn_libgtp.c:321 Received DELETE PDP CTX CONF, cause=128(Request accepted) <0013> gprs_sndcp.c:320 SNSM-DEACTIVATE.ind (lle=0x8095d08, TLLI=e3ddd574, SAPI=11, NSAPI=5) <0011> gprs_bssgp.c:376 BSSGP TLLI=0xe3ddd574 Rx UPLINK-UNITDATA <0012> gprs_llc.c:551 LLC SAPI=1 C FCS=0xb85a96CMD=UI DATA <0011> gprs_bssgp.c:376 BSSGP TLLI=0xe3ddd574 Rx UPLINK-UNITDATA <0012> gprs_llc.c:551 LLC SAPI=1 C FCS=0xbe5a96CMD=UI DATA <0002> gprs_gmm.c:214 Starting MM timer 3350 while old timer 3350 pending <0012> gprs_llc.c:417 LLC TX: unknown TLLI 0xe3ddd574, creating LLME on the fly Assert failed msgb_tlli(msg) == mmctx->llme->tlli || msgb_tlli(msg) == mmctx->llme->old_tlli || tlli_foreign2local(msgb_tlli(msg)) == mmctx->llme->tlli || tlli_foreign2local(msgb_tlli(msg)) == mmctx->llme->old_tlli gprs_llc.c:123 backtrace() returned 18 addresses /home/ich/install/openbsc/lib/libosmocore.so.4(osmo_generate_backtrace+0x16) [0xb7bb6a36] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x805224a] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804a2f6] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804b687] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804bc35] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804bd4e] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804d20c] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x8052be4] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn(bssgp_prim_cb+0x55) [0x804f5a4] /home/ich/install/openbsc/lib/libosmogb.so.2(bssgp_rcvmsg+0x3b8) [0xb7b626b8] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804f4f1] /home/ich/install/openbsc/lib/libosmogb.so.2(gprs_ns_rcvmsg+0x8c7) [0xb7b5ecf7] /home/ich/install/openbsc/lib/libosmogb.so.2(+0x4311) [0xb7b5f311] /home/ich/install/openbsc/lib/libosmocore.so.4(osmo_select_main+0x192) [0xb7bb2ed2] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x804fbcd] /lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xf5) [0xb796a8f5] /home/ich/source/gsm/openbsc/openbsc/src/gprs/osmo-sgsn() [0x8049db1] Program received signal SIGABRT, Aborted. 0xb7fde424 in __kernel_vsyscall () (gdb) bt #0 0xb7fde424 in __kernel_vsyscall () #1 0xb797f83f in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb7982cf3 in __GI_abort () at abort.c:90 #3 0x0805224f in _bssgp_tx_dl_ud (mmctx=0x80932d0, msg=0x80963a8) at gprs_llc.c:120 #4 gprs_llc_tx_ui (msg=0x80963a8, sapi=1 '\001', command=0, mmctx=0x80932d0) at gprs_llc.c:496 #5 0x0804a2f6 in gsm48_gmm_sendmsg (msg=0x80963a8, command=0, mm=0x80932d0) at gprs_gmm.c:241 #6 0x0804b687 in gsm48_tx_gmm_ra_upd_ack (mm=0x80932d0) at gprs_gmm.c:851 #7 0x0804bc35 in gsm48_rx_gmm_ra_upd_req (mmctx=0x80932d0, msg=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1004 #8 0x0804bd4e in gsm0408_rcv_gmm (mmctx=0x80932d0, msg=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1036 #9 0x0804d20c in gsm0408_gprs_rcvmsg (msg=msg@entry=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1566 #10 0x08052be4 in gprs_llc_rcvmsg (msg=0x8091ce8, tv=0xbfffdcb0) at gprs_llc.c:882 #11 0x0804f5a4 in bssgp_prim_cb (oph=oph@entry=0xbfffdc8c, ctx=ctx@entry=0x0) at sgsn_main.c:114 #12 0xb7b626b8 in bssgp_rx_ul_ud (tp=0xbfffdcb0, msg=0x8091ce8, ctx=<optimized out>) at gprs_bssgp.c:398 #13 bssgp_rx_ptp (bctx=0x8091a08, tp=0xbfffdcb0, msg=0x8091ce8) at gprs_bssgp.c:820 #14 bssgp_rcvmsg (msg=0x8091ce8) at gprs_bssgp.c:1016 #15 0x0804f4f1 in sgsn_ns_cb (event=GPRS_NS_EVT_UNIT_DATA, nsvc=0x8090740, msg=0x8091ce8, bvci=1801) at sgsn_main.c:92 #16 0xb7b5ecf7 in gprs_ns_rx_unitdata (msg=0x8091ce8, nsvc=0x8090740) at gprs_ns.c:616 #17 gprs_ns_rcvmsg (nsi=nsi@entry=0x807fd38, msg=msg@entry=0x8091ce8, saddr=saddr@entry=0xbfffedc0, ll=ll@entry=GPRS_NS_LL_UDP) at gprs_ns.c:841 #18 0xb7b5f311 in handle_nsip_read (bfd=0x807fd58) at gprs_ns.c:991 #19 nsip_fd_cb (bfd=0x807fd58, what=1) at gprs_ns.c:1024 #20 0xb7bb2ed2 in osmo_select_main (polling=0) at select.c:158 #21 0x0804fbcd in main (argc=3, argv=0xbffff234) at sgsn_main.c:369 (gdb) frame 5 #5 0x0804a2f6 in gsm48_gmm_sendmsg (msg=0x80963a8, command=0, mm=0x80932d0) at gprs_gmm.c:241 241 return gprs_llc_tx_ui(msg, GPRS_SAPI_GMM, command, mm); (gdb) p msgb_tlli(msg) $1 = 3822966132 (gdb) frame 4 #4 gprs_llc_tx_ui (msg=0x80963a8, sapi=1 '\001', command=0, mmctx=0x80932d0) at gprs_llc.c:496 496 return _bssgp_tx_dl_ud(msg, mmctx); (gdb) p mmctx $2 = (void *) 0x80932d0 (gdb) frame 3 #3 0x0805224f in _bssgp_tx_dl_ud (mmctx=0x80932d0, msg=0x80963a8) at gprs_llc.c:120 120 OSMO_ASSERT(msgb_tlli(msg) == mmctx->llme->tlli (gdb) p mmctx $3 = (struct sgsn_mm_ctx *) 0x80932d0 (gdb) p *mmctx $4 = {list = {next = 0x8092e28, prev = 0x805c318 <sgsn_mm_ctxts>}, imsi = "901700000003094\000", mm_state = GMM_REGISTERED_NORMAL, p_tmsi = 296043751, p_tmsi_old = 2075232571, p_tmsi_sig = 0, imei = "353943044782210\000", msisdn = '\000' <repeats 14 times>, ra = {mnc = 70, mcc = 901, lac = 1, rac = 0 '\000'}, cell_id = 0, cell_id_age = 0, sac = 0, sac_age = 0, new_sgsn_addr = 0, ciph_algo = GPRS_ALGO_GEA0, ms_radio_access_capa = {len = 11 '\v', buf = "4\307\003*\240B|\255\341\030\v", '\000' <repeats 38 times>}, ms_network_capa = { len = 2 '\002', buf = "\345\200\000\000\000\000\000"}, drx_parms = 3329, mnrg = 0, ngaf = 0, ppf = 0, recovery = 0, radio_prio_sms = 0 '\000', pdp_list = {next = 0x8093390, prev = 0x8093390}, llme = 0x8095630, tlli = 3822966132, tlli_new = 3517269223, nsei = 1801, bvci = 1801, ctrg = 0x8096048, timer = {node = {rb_parent_color = 3082574944, rb_right = 0x0, rb_left = 0x0}, list = {next = 0x80933b8, prev = 0x80933b8}, timeout = { tv_sec = 1375260414, tv_usec = 864196}, active = 1, cb = 0x804bfd0 <mmctx_timer_cb>, data = 0x80932d0}, T = 3350, num_T_exp = 0, t3350_mode = GMM_T3350_MODE_RAU, t3370_id_type = 1 '\001'} (gdb) p msgb_tlli(msg) No symbol "msgb_tlli" in current context. (gdb) frame 5 #5 0x0804a2f6 in gsm48_gmm_sendmsg (msg=0x80963a8, command=0, mm=0x80932d0) at gprs_gmm.c:241 241 return gprs_llc_tx_ui(msg, GPRS_SAPI_GMM, command, mm); (gdb) frame 6 #6 0x0804b687 in gsm48_tx_gmm_ra_upd_ack (mm=0x80932d0) at gprs_gmm.c:851 851 return gsm48_gmm_sendmsg(msg, 0, mm); (gdb) p msgb_tlli(msg) $5 = 3822966132 (gdb) p mmctx->tlli No symbol "mmctx" in current context. (gdb) p mm->tlli $6 = 3822966132 (gdb) p mm->tlli_new $7 = 3517269223 (gdb) p mm->llme->tlli $8 = 3517269223 (gdb) p mm->llme->tlli_old There is no member named tlli_old. (gdb) p mm->llme->old_tlli $9 = 4222716219 (gdb) bt #0 0xb7fde424 in __kernel_vsyscall () #1 0xb797f83f in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb7982cf3 in __GI_abort () at abort.c:90 #3 0x0805224f in _bssgp_tx_dl_ud (mmctx=0x80932d0, msg=0x80963a8) at gprs_llc.c:120 #4 gprs_llc_tx_ui (msg=0x80963a8, sapi=1 '\001', command=0, mmctx=0x80932d0) at gprs_llc.c:496 #5 0x0804a2f6 in gsm48_gmm_sendmsg (msg=0x80963a8, command=0, mm=0x80932d0) at gprs_gmm.c:241 #6 0x0804b687 in gsm48_tx_gmm_ra_upd_ack (mm=0x80932d0) at gprs_gmm.c:851 #7 0x0804bc35 in gsm48_rx_gmm_ra_upd_req (mmctx=0x80932d0, msg=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1004 #8 0x0804bd4e in gsm0408_rcv_gmm (mmctx=0x80932d0, msg=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1036 #9 0x0804d20c in gsm0408_gprs_rcvmsg (msg=msg@entry=0x8091ce8, llme=0x8095630) at gprs_gmm.c:1566 #10 0x08052be4 in gprs_llc_rcvmsg (msg=0x8091ce8, tv=0xbfffdcb0) at gprs_llc.c:882 #11 0x0804f5a4 in bssgp_prim_cb (oph=oph@entry=0xbfffdc8c, ctx=ctx@entry=0x0) at sgsn_main.c:114 #12 0xb7b626b8 in bssgp_rx_ul_ud (tp=0xbfffdcb0, msg=0x8091ce8, ctx=<optimized out>) at gprs_bssgp.c:398 #13 bssgp_rx_ptp (bctx=0x8091a08, tp=0xbfffdcb0, msg=0x8091ce8) at gprs_bssgp.c:820 #14 bssgp_rcvmsg (msg=0x8091ce8) at gprs_bssgp.c:1016 #15 0x0804f4f1 in sgsn_ns_cb (event=GPRS_NS_EVT_UNIT_DATA, nsvc=0x8090740, msg=0x8091ce8, bvci=1801) at sgsn_main.c:92 #16 0xb7b5ecf7 in gprs_ns_rx_unitdata (msg=0x8091ce8, nsvc=0x8090740) at gprs_ns.c:616 #17 gprs_ns_rcvmsg (nsi=nsi@entry=0x807fd38, msg=msg@entry=0x8091ce8, saddr=saddr@entry=0xbfffedc0, ll=ll@entry=GPRS_NS_LL_UDP) at gprs_ns.c:841 #18 0xb7b5f311 in handle_nsip_read (bfd=0x807fd58) at gprs_ns.c:991 #19 nsip_fd_cb (bfd=0x807fd58, what=1) at gprs_ns.c:1024 #20 0xb7bb2ed2 in osmo_select_main (polling=0) at select.c:158 #21 0x0804fbcd in main (argc=3, argv=0xbffff234) at sgsn_main.c:369 (gdb) frame 3 #3 0x0805224f in _bssgp_tx_dl_ud (mmctx=0x80932d0, msg=0x80963a8) at gprs_llc.c:120 120 OSMO_ASSERT(msgb_tlli(msg) == mmctx->llme->tlli (gdb) p msgb_tlli(msg) No symbol "msgb_tlli" in current context. (gdb) frame 4 #4 gprs_llc_tx_ui (msg=0x80963a8, sapi=1 '\001', command=0, mmctx=0x80932d0) at gprs_llc.c:496 496 return _bssgp_tx_dl_ud(msg, mmctx); (gdb) p msgb_tlli(msg) No symbol "msgb_tlli" in current context. (gdb) frame 5 #5 0x0804a2f6 in gsm48_gmm_sendmsg (msg=0x80963a8, command=0, mm=0x80932d0) at gprs_gmm.c:241 241 return gprs_llc_tx_ui(msg, GPRS_SAPI_GMM, command, mm); (gdb) p msgb_tlli(msg) $10 = 3822966132 (gdb) p mm->tlli $11 = 3822966132 (gdb) p mm->tlli_new $12 = 3517269223 (gdb) p mm->tlli_new $13 = 3517269223 (gdb) p mm->llme->tlli $14 = 3517269223 (gdb) p mm->llme->tlli_old There is no member named tlli_old. (gdb) p mm->llme->old_tlli $15 = 4222716219 (gdb) p mm->llme->state $16 = GPRS_LLMS_ASSIGNED (gdb) q
2013-07-31gprs_llc: Assert that we send frames with either tlli or old_tlliHolger Hans Peter Freyther1-15/+21
In case we have access to the context verify that the selected msgb_tlli is either the old_tlli or the tlli in either local or foreign format. It is wrong to use any other TLLI.
2013-07-31gprs_llc: Work on finding the right LLE/LLME in case of routing area updateHolger Hans Peter Freyther1-65/+94
Attempt to solve what f0901f0067e363c0ced6254db1b45a9771640412 tried to solve without breaking the case of someone with a foreign TLLI from a different network. Lookup with the foreign TLLI converted to a local one in case we did not find the TLLI and only then create a LLE/LLME on the fly for the RX path.
2013-07-31gprs_llc: Lookup lle based on the real TLLIHolger Hans Peter Freyther1-3/+1
During the GPRS Attach procedure we might have a foreign tlli and in the RX create a LLME on the fly for this tlli. The GMM GPRS Attach handling code will then assign a new TLLI and keep the foreign tlli as the llme->old_tlli. When the GMM is sending the identity request the msgb_tlli will point to the foreign tlli. The GPRS LLC code will then try to find that foreign tlli but due the conversion this will not be found. Instead a new ad-hoc LLE/LLME will be created on the fly for each message (this means there are duplicate LLE/LLMEs in the list). Make the code more strict and remove the tlli_foreign2local change from the look-up routine. This will make the GPRS LLC code find the right LLE/LLME and the N(U) will be handled correctly. This partially reverts: f0901f0067e363c0ced6254db1b45a9771640412 Addresses: <0012> gprs_llc.c:773 LLC RX: unknown TLLI 0xadf11820, creating LLME on the fly ... <0012> gprs_llc.c:357 LLC TX: unknown TLLI 0xedf11820, creating LLME on the fly Reproducable: Use pcu_emu (gprs attach) and observe with wireshark.
2013-07-31gprs_sgsn: In case of a Activate PDP Context timeout we should free pdpHolger Hans Peter Freyther1-0/+9
In case of a failure this method didn't set the pctx->lib back to NULL. In case of a timeout the callback will be made with pdp=NULL and this would lead to leaking the PDP context. Check for the case of having a pctx->lib != pdp and free it. This resolves: <000f> gprs_sgsn.c:259 freeing PDP context that still has a libgtp handle attached to it, this shouldn't happen!
2013-07-28gprs: Fix a typo in the commentHolger Hans Peter Freyther1-1/+1
2013-07-21sgsn: spelling fixes inside commentsHarald Welte2-3/+3
2013-07-21sgsn: Add "auth-policy" VTY command to enable/disable ACLHarald Welte2-1/+19
2013-07-21sgsn: add a minimalistic ACLHarald Welte3-2/+82
This adds a minimalistic ACL by which certain, individual roaming IMSIs can be authorized to use the SGSN. So you can selectively bypass the 'MCC+MNC == first 5 digits of IMSI' checking for a couple of IMSIs
2013-07-04sgsn: Fix the unimplemented/uninstalled show ggsn commandHolger Hans Peter Freyther1-7/+0
This is fixing a GCC and Coverity warning. GCC: sgsn_vty.c: At top level: sgsn_vty.c:308:1: warning: ‘show_ggsn_cmd’ defined but not used [-Wunused-variable] Coverity: CID 1040727
2013-07-04sgsn_vty: Fix uninitialized variable in the gprs_apn2str methodHolger Hans Peter Freyther1-1/+1
This is fixing a GCC and Coverity warning: GCC: sgsn_vty.c: In function ‘vty_dump_pdp’: sgsn_vty.c:64:5: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized] sgsn_vty.c:49:15: note: ‘i’ was declared here Coverity: CID 1040706
2013-07-04sgsn: Fix logically dead code in regard to the osmo_fd_registerHolger Hans Peter Freyther1-4/+9
The code was written like checking the return value of the osmo_fd_register but the rc variable was not assigned for the subsequent calls. Fixes: Coverity CID 1040741
2013-07-04sgsn: Fix lengths of MS Network Capability and MS Radio Access Capability ↵Alexander Chemeris1-4/+3
elements. Original code was inconsistent about lengths and could lead to out of bounds write. Lengths were also inconsistent with the TS 24.008. Fixes: Coverity CID 1040714.
2013-06-21GPRS LLC: Add non-standard method of sequence number recoveryHarald Welte1-1/+17
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.
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2012-12-19misc: Fix compilation now that the method is located in libosmocoreHolger Hans Peter Freyther1-7/+0
These TLV helper functions are now located in libosmocore.
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther1-6/+0
2012-09-11gbproxy: Address two unaligned memory access warningsHolger Hans Peter Freyther1-8/+14
The lines 461 and 303 were producing unaligned memory access as the BVCI was not aligned properly. Introduce a tlvp_val16_unal to read 16bit from the data, use memcpy to the stack to make sure that it is working in the aligned and unaligned case.
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte2-2/+2
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).
2012-08-03gb: suspend_ref was changed to a plain uint8_t, update the codeHolger Hans Peter Freyther1-1/+1
Require a 0.5.2+ libosmogb due the change of the suspend_ref type.
2012-07-28misc: Introduce a script tha generates the VTY referenceHolger Hans Peter Freyther1-24/+0
Update/Move/Create example configuration files for NiTB, BSC, MGCP, NAT and the GbProxy. Create a script that starts, generates the vty reference and terminates the application.
2012-07-14SGSN: Code to help debug / fix sgsn crash in cb_data_ind()Harald Welte2-1/+26
A crash was obsserved in cb_data_ind() when mm is dereferenced. This patch adds some safeguards that try to prevent the library handle back-pointer to the pdp_ctx to be NULL, and print a stack backtrace in case we are free() ing the sgsn-side pdp_ctx while there's still a library handle attached.
2012-07-14add some comments regarding the free() / release of pdp contextxHarald Welte2-0/+8
It might be that we're deleting structures instead of properly cleaning up the attached libgtp handles...
2012-07-04GPRS LLC: fix segfault when transmitting downlink unit-data without mmctxHarald Welte1-5/+10
2012-06-17use new external libosmogb (part of libosmocore.git)0.12.0Harald Welte1-6/+5
This removes the libgb (GPRS NS/BSSGP) code from the openbsc.git repository and uses the new version from libosmocore.git instead.
2012-06-17libgb: make sure all BSSGP functions have bssgp_ prefixHarald Welte4-6/+6
We change the minority of functions employing the gprs_bssgp_ prefix to match with the majority without gprs_ in front.
2012-06-17libgb/gprs: don't use log_info from libcommon anymoreHarald Welte2-4/+93
2012-06-17libgb: prefix all NS related functions with gprs_Harald Welte2-3/+3
2012-06-17libgb: don't call directly into GMM / LLC layerHarald Welte3-2/+35
Instead of direct function calls to individual functions, we now generate primitives (osmo_prim) and send them to one application-provided function "bssgp_prim_cb()"
2012-06-17libgb: remove dependency of BSSGP to include sgsn/gmm internal structsHarald Welte1-2/+22
2012-06-16libgb: Remove dependency to openbsc/debug.hHarald Welte2-0/+5
2012-06-16libgb: remove dependencies to openbsc/vty.h and openbsc/gsm_data.hHarald Welte2-2/+2
Rather than using openbsc internal data/functions, we now use only internal and libosmocore-provided ones.
2012-06-16libgb: Use library SS_L_NS instead lf local SS_NSHarald Welte3-3/+3
which removes some further dependencies of libgb to openbsc internal code and data.
2012-06-16libgb: move GPRS specific msgb CB definitions to separate headerHarald Welte1-3/+3
2012-06-16split libgb into a separate library for outside useHarald Welte10-15/+21
This also removes the dependency to osmo_sock() inside libcommon and replaces it with osmo_sock_* from libosmocore
2012-03-01misc: Use msgb_free for freeing the messagesHolger Hans Peter Freyther3-3/+3
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-2/+3
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther1-2/+3
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-11-06sgsn: Make sure each parameter has some sort of documentationHolger Hans Peter Freyther1-5/+8
2011-11-06gb_proxy: Make sure each parameter has some sort of documentationHolger Hans Peter Freyther1-1/+3
2011-10-16GPRS GMM: When we receive a RA UPD REQ, we are NORMAL even after SUSPENDHarald Welte1-0/+3
There is no explicit BSSGP RESUME in case the MS sends a RA UPD REQ after being in SUSPEND previously.
2011-10-16GPRS LLC: fix compiler warningHarald Welte1-1/+1
2011-10-16GPRS GMM: Send LLGMM-RESET.req when talking to unknown MSHarald Welte1-0/+5
In case a MS (of which we have no MM context) sends us anything but a GMM ATTACH REQUEST, we need to send it a LLC XID RESET (by means of issuing LLGMM-RESET.req). Otherwise the phone will expect us to send a specific unacknowledged sequence number that we don't know. Thanks to Holger for pointing this bug out to me. It seems to commonly occur when a MS is doing network re-selection and (erroneously) sends a RA UPD REQ instead of an ATTACH REQ. The RA UPD REJ that we sent was never seen by the GMM entity in the MS, as the LLC entity discarded it due to sequence number mis-match.
2011-10-16LLC: Add minimal LLGMM-RESET.req implementationHarald Welte1-11/+67
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-10-16misc: Linking fixes for Ubuntu 11.10 CompilerHolger Hans Peter Freyther1-3/+5
Ubuntu 11.10 has changed some linker/compiler flags. Some fixes for this can be seen here[1]. In general the to be linked libs need to be moved into the LDADD section of parameters. This is with the old BFD linker (not gold). This is likely to end in some ping-pong with other versions of the linker. [1] https://bugs.launchpad.net/ubuntu/+source/nis/+bug/771034 Errors: /usr/bin/ld.bfd.real: bsc_hack.o: undefined reference to symbol 'osmo_init_ignore_signals' /usr/bin/ld.bfd.real: note: 'osmo_init_ignore_signals' is defined in DSO /home/ich/install/openbsc/lib/libosmocore.so so try adding it to the linker command line /home/ich/install/openbsc/lib/libosmocore.so: could not read symbols: Invalid operation ... ../../src/libbsc/libbsc.a(rest_octets.o):/home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:381: more undefined references to `bitvec_set_bit' follow ../../src/libbsc/libbsc.a(rest_octets.o): In function `rest_octets_si13': /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:382: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:383: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:385: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:402: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:403: undefined reference to `bitvec_set_uint'
2011-10-14gprs: Fix various compiler warningsHolger Hans Peter Freyther1-2/+2
2011-10-14gprs: Fix compiler warnings in the codeHolger Hans Peter Freyther2-2/+4
2011-10-14gprs_gmm: Fix various compiler warningsHolger Hans Peter Freyther1-4/+7
gprs_gmm.c:240:2: warning: passing argument 4 of ‘gprs_llc_tx_ui’ discards qualifiers from pointer target type ../../include/openbsc/gprs_llc.h:151:5: note: expected ‘void *’ but argument is of type ‘const struct sgsn_mm_ctx *’ gprs_gmm.c:349:11: warning: unused variable ‘ptsig’ gprs_gmm.c:601:5: warning: too many arguments for format gprs_gmm.c:987:25: warning: initialization discards qualifiers from pointer target type gprs_gmm.c:1010:6: warning: ‘rc’ may be used uninitialized in this function
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso2-2/+2
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.