gsm/a5: Return -ENOTSUP if the selected cipher is not supported

Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru>

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
sms: Print 'network' or 'mobile' when creating the SMC/SMR
rsl: Add the 9.3.20 release mode enum to be used in OpenBSC
osmo-arfcn: add support for PCS band
gsm: Add method to find ARFCN based on frequency

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
utils/osmo-arfcn: Implement option to get ARFCN from frequency

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
build: Don't use the deprecated INCLUDES in the various Makefile.am

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
core: Fix missing include in msgfile.c for getline

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Add tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit values

This is required for CPUs < armv6, to access 16 and 32 values at right
memory locations.
lapd: Check in rslms_rx_rll() if lapdm context was initialized earlier

This was found while implementing handover on a sysmobts. When we
receive a channel release request for a channel that was never really
activated (set_lapdm_context() was not called) we segfault in
lapd_recv_dlsap().

We now return early with -EINVAL in rslms_rx_rll() if we receive a
message that assumes set_lapdm_context() was already called.

These are:
* RSL_MT_UNIT_DATA_REQ
* RSL_MT_DATA_REQ
* RSL_MT_SUSP_REQ
* RSL_MT_REL_REQ

A test case was added to trigger the issue.
lapd: Fix compiler warnings in the lapd code

lapd_test.c: In function ‘ms_to_bts_l1_cb’:
lapd_test.c:192:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
lapd_test.c:199:1: warning: no return statement in function returning non-void [-Wreturn-type]
lapd_test.c: In function ‘main’:
lapd_test.c:355:2: warning: implicit declaration of function ‘osmo_init_logging’ [-Wimplicit-function-declaration]
tests: Don't delete atconfig in clean

This file is created in ./configure so we shouldn't remove it with make.
Otherwise ./configure && make clean && make check fails with:

make[3]: *** No rule to make target `atconfig', needed by `check-local'.
Stop.
core/bits: Prevent osmo_revbytebits_buf stack trashing

The second loop in osmo_revbytebits_buf() in src/bits.c grabs
4 bytes each iteration, which can easily go past the supplied
input in some cases.

Compiled with -fstack-protector , I get a "stack smashing detected"
in the bits test.

From: Nils O. Selåsdal <noselasd@fiane.dyndns.org>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
vty: Do better filtering of arguments, optional args particularly

This is essentially http://patchwork.diac24.net/patch/271/ forward
ported to libosmovty

Original-by: Paul Jakma <paul@quagga.net>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
debian: Bump the changelog and package osmo-arfcn
Replace obsolete automake AM_CONFIG_HEADER.

This fixes the following complaint by autoconf 2.69-1, automake 1.13.1-1.

:  configure.ac:80: error: 'AM_CONFIG_HEADER': this macro is obsolete.
:      You should use the 'AC_CONFIG_HEADERS' macro instead.
:      /usr/share/aclocal-1.13/obsolete-err.m4:12: AM_CONFIG_HEADER is expan
:      configure.ac:80: the top level

Automake 1:1.11.3-1ubuntu2, autoconf 2.68-1ubuntu2 don't even emit a warning
without, and work just fine with this patch.

Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
tests/timer: tweak path to config.h

When building out-of-srcdir, "../../config.h" fails to reach config.h
because the compiler is invoked in $builddir/tests/, not
$builddir/tests/timer/.  Use "../config.h" instead; this also works
for in-srcdir builds.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
doxyfiles: refer paths to @srcdir@

When building out-of-srcdir, paths such as "src/gsm" will not find any
source files.  Since the Doxyfiles are preprocessed, we can prepend
@srcdir@ to fix that.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
add some missing doxygen annotation for libosmocore functions
Fix build on Cygwin