Commit Graph

3634 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 93ef33edb6 tests: Use atlocal/atlocal.in to enable/disable the NAT test
Kill the hacking, use atlocal to remember if the NAT test should
be enabled and then skip the test (exit with 77).
2012-01-09 22:53:04 +01:00
Holger Hans Peter Freyther 03ff1c8477 Revert "tests: Make the test setup more abusive to fix the build"
This reverts commit 41b42c7229.
2012-01-09 21:49:47 +01:00
Holger Hans Peter Freyther 41b42c7229 tests: Make the test setup more abusive to fix the build
Paolo says I will need to use atconfig/atlocal, need to read up on
it first though.
2012-01-09 21:13:15 +01:00
Holger Hans Peter Freyther faf1f64a2d gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged information
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.
2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther 26d0fe3c89 gprs_sgsn.h: Include timer.h for the timer struct 2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther 6c88217c19 tests: Introduce running tests with GNU autotest in OpenBSC
The quality of the tests is of different value but it is good to
get started and improve from here.
2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther d5b3ca621b mgcp: Print message when the test is finished 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 300457b7d2 gsm0408: Print message when the test is done 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 45222a79e2 db: Fix the test code
* Initialize logging
* use a dummy net before calling subcr_put as the keep in ram
  option is going to be set.
2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 08e324fda7 channel: Make the test not crash again.
* Initialize logging
* The callback expects NULL or a subscriber connection
2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther f5ede52a22 nat: Log test output stdout using printf in prep for GNU autotest 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 40aac3f7f6 bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API
is doing an assignment underneath which is not handled by the code,
add dumy handlers to not crash, the right thing to do is to change
MNCC to have an assignment that can succeed/fail.

The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should
wait for an ack/nack but right now the call just continues.
2011-12-27 12:55:44 +01:00
Andreas Eversberg 3365cd1cfe RSL: Nokia BTS reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-24 11:49:05 +01:00
Andreas Eversberg 2957de9228 RSL: BS-11 reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-16 17:45:37 +01:00
Gus Bourg 1c5dd2c9bb Add NITZ (timezone) support as part of MM INFO
The UTC offset from the operating system will be used by default to
calculate the NITZ in MM INFO.  However,  a "timezone" vty command is
added at the BTS level, allowing BTS-specific overrides, e.g. in case
BTSs are distributed accross multiple timezones.
2011-12-02 10:18:17 +01:00
Alexander Huemer 6b8a56c365 fix two mistakes in AM_LDFLAGS 2011-11-25 09:43:45 +01:00
Harald Welte 511bd8e98c BSSGP: Add functions required for true BSS-side BSSGP implementation
The BSS-side of BSSGP requires quite a number of additional functions
for sending unidirectional messages that a SGSN never sends.

This is a first step into completing the BSSGP implementation and making
it ready to be used from osmo-bts and other BTS-side GPRS
implementations.
2011-11-25 08:58:40 +01:00
Harald Welte b52b4cfc48 BSSGP: add more doxygen comments 2011-11-25 08:15:42 +01:00
Harald Welte 8cbc4a406d GPRS: add new bssgp_create_cell_id(), opposite of bssgp_parse_cell_id() 2011-11-24 21:33:16 +01:00
Harald Welte 914660d6f6 GPRS NS: Add some doxygen API documentation 2011-11-24 21:33:16 +01:00
Sylvain Munaut 63ef215e15 bsc_vty: Fix usage of deprecated osmo_osmo_hexdump_nospc
The typo was fixed upstream

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 23:05:48 +01:00
Harald Welte f7e94106bb osmo_nitb: introduce --no-dbcounter command line option
this allows us to disable writing the current rate counters to the
sqlite database every 60 seconds.
2011-11-13 19:03:34 +01:00
Holger Hans Peter Freyther 2692e3bcff gsm0408: Print a message when the LU is timing out. 2011-11-07 12:26:29 +01:00
Holger Hans Peter Freyther 347e7ba377 mncc: Introduce a hello packet that is sent to the client.
Send a hello packet down to the client with the version number
of the MNCC interface. The hello structure might be extended to
include the endianes, size of each structure, etc.
2011-11-06 21:49:18 +01:00
Holger Hans Peter Freyther 1491f2e7a9 sgsn: Make sure each parameter has some sort of documentation 2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther 2eb6e2c0ad gb_proxy: Make sure each parameter has some sort of documentation 2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther 3ffcf2045c mgcp: Make sure each command has some kind of online help
In this iteration I just want to make sure that each VTY command has
online help. Replace "a b" with "a-b" if there is no "a c" with b!=c.

This config should gain some more sanity and consistency, this will
happen in another iteration.
2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther da6597ea29 mncc: Remove FIXME about queuing messages
mncc_sock_from_cc will discard the messages when the
fd has been set to -1.
2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther 694c82d8e3 mncc: Address the fixme and put the mncc_sock_state in gsm_network
Remove the unused mncc_sock_write_pending, switch over from the
static s_state to net->mncc_state.
2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther 2a260ee9bc misc: Fix typo...'teh' -> 'the' 2011-11-06 21:41:51 +01:00
Andreas.Eversberg bb5c594e15 nokia: Use a longer T200 because RSL link can be pretty slow after a reset
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-02 23:11:19 +01:00
Sylvain Munaut 86aaefe17b build: Update configure.ac to use libgtp.pc rather than manual detection
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-18 21:51:42 +02:00
Sylvain Munaut 2192ed8d61 libbsc/nokia_site: Increase reset timer to 15 seconds
Also make sure to specify seconds in the 'seconds' field. Doing
otherwise is an abuse that non longer works with the new timer infra.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-18 21:51:03 +02:00
Sylvain Munaut c951946691 libbsc/nokia_site: Fix reset procedure and add option to skip it.
do_reset was not initialized anywhere anymore, so the reset was never
triggered. It's now fixed and we add an option to skip it in the
config so that when in production, you can restart without config
changes quickly.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-18 21:51:02 +02:00
Sylvain Munaut 67c0c7f8aa libbsc/nanobts: Fix NSVC OML init sequence for some rugby models
The NVC never goes to OFF LINE but only to DEPENDENCY (because of
missing attributes).

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-17 13:57:58 +02:00
Sylvain Munaut 851f1206a8 libbsc: Don't include ext_info in SI13 if not in EGPRS mode
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-17 13:56:02 +02:00
Harald Welte d4c6f8b343 GPRS GMM: When we receive a RA UPD REQ, we are NORMAL even after SUSPEND
There is no explicit BSSGP RESUME in case the MS sends a RA UPD REQ
after being in SUSPEND previously.
2011-10-16 21:35:21 +02:00
Harald Welte 066a0f5c0b GPRS LLC: fix compiler warning 2011-10-16 18:59:20 +02:00
Harald Welte 2b697a6671 GPRS GMM: Send LLGMM-RESET.req when talking to unknown MS
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-16 18:58:30 +02:00
Harald Welte 0c1a30312d LLC: Add minimal LLGMM-RESET.req implementation
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-16 18:58:30 +02:00
Holger Hans Peter Freyther 37a63ca34a misc: Linking fixes for Ubuntu 11.10 Compiler
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-16 17:08:51 +02:00
Holger Hans Peter Freyther 3dccda5ef0 gprs: Fix various compiler warnings 2011-10-14 23:42:13 +02:00
Holger Hans Peter Freyther 6142dc407a gprs: Fix compiler warnings in the code 2011-10-14 23:37:27 +02:00
Holger Hans Peter Freyther 2b17454f4a gprs_gmm: Fix various compiler warnings
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-10-14 23:31:34 +02:00
Holger Hans Peter Freyther 42b9195023 gprs: This comes from libosmocore, remove it here 2011-10-14 23:28:07 +02:00
Holger Hans Peter Freyther 30ebcf71d0 osmo-sgsn: Install the osmo-sgsn configuration for debian 2011-10-13 23:54:33 +02:00
Holger Hans Peter Freyther 00a8ab9d3b sgsn: Add a configuration that is accepted by osmo-sgsn
Provide an exmaple that is accepted by osmo-sgsn.
2011-10-13 23:53:18 +02:00
Alexander Huemer 670ffe3290 libctrl: only free() msgb if it was alloc()ed
Before this patch a SIGABRT was caused when doing e.g.:
$ ncat 127.0.0.1 4249
^C
2011-10-12 08:30:44 +02:00
Holger Hans Peter Freyther 74c7dc36b6 bsc: Put the full stop before the \n in the log message 2011-10-12 08:30:36 +02:00
Holger Hans Peter Freyther cc98d188eb bsc: Add new SCCP connections to the tail 2011-10-12 08:30:29 +02:00