libosmocore[master]: Add a README file for some background information about this...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If034c6f551ff9bfaff0b8368fd0963f3147155b9 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmo-abis[master]: jenkins: add value_string termination check
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I37c14c1a18207f64aa5e15ec0d2503bc834b2627 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-pcu[master]: jenkins: add value_string termination check
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1958 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27217c9162efd800eebcb403eab770f4528d21ac Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
openbsc[master]: jenkins: add value_string termination check
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4183415cd1ead9d46ae3a556e94243325ef5a844 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-trx[master]: Add test program to verify convolution implementation
Review at https://gerrit.osmocom.org/2104 Add test program to verify convolution implementation Convolution is a complex process and we should be able to verify if computing results change when the implementation is touched. This commit adds a test program that executes some testcases. The testcases are crafted in a way that every implmentation (several different ones for SSE) is executed once. The output can be compared against the included .ok file. Change-Id: Ic702ecb356c652fbcd76bee689717fb5d3526fe9 --- A utils/convolvetest/Makefile A utils/convolvetest/convtest.ok A utils/convolvetest/main.c 3 files changed, 238 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/04/2104/1 diff --git a/utils/convolvetest/Makefile b/utils/convolvetest/Makefile new file mode 100644 index 000..0ce4cb1 --- /dev/null +++ b/utils/convolvetest/Makefile @@ -0,0 +1,16 @@ +all: main.o convolve_base.o convolve.o + gcc -g -Wall ./*.o -o convtest -losmocore + +clean: + rm -f ./*.o + rm -f ./convtest + +main.o: main.c + gcc -g -Wall -c main.c + +convolve_base.o: ../../Transceiver52M/common/convolve_base.c + gcc -std=c99 -c ../../Transceiver52M/common/convolve_base.c + +convolve.o: ../../Transceiver52M/x86/convolve.c + gcc -std=c99 -c ../../Transceiver52M/x86/convolve.c -I ../../Transceiver52M/common/ -msse3 -DHAVE_SSE3 + diff --git a/utils/convolvetest/convtest.ok b/utils/convolvetest/convtest.ok new file mode 100644 index 000..5766252 --- /dev/null +++ b/utils/convolvetest/convtest.ok @@ -0,0 +1,72 @@ + TEST COMPLEX BASE IMPLEMENTATION +float x[] = {0.828957,0.675654,0.904170,0.191112,0.394521,0.706067,0.868924,0.547397,0.738959,0.932485,0.233119,0.926576,0.551443,0.933420,0.494407,0.552568,0.939129,0.799646,0.814139,0.594497,0.657201,0.995300,0.935852,0.324541,0.874309,0.589157,0.637771,0.759324,0.775421,0.794910,0.262785,0.604379,0.470564,0.166955} + +float h[] = {0.726144,0.746635,0.470674,0.211604,0.963092,0.264553,0.265818,0.725771,0.590649,0.313560,0.547613,0.946811,0.793753,0.690502,0.276120,0.792995,0.446645} + +float y[] = {0.389293,10.824917,-0.676577,10.619646,0.283489,11.279525,0.384482,11.586230,0.711259,11.540458,-0.391531,11.281723,0.019900,12.278080,-0.070459,11.104558,0.087938,11.825965,-1.003252,11.698885,0.358887,11.911197,-0.678904,11.933812,0.245140,11.886644} + + TEST COMPLEX SSE3 IMPLEMENTATION: (h_len%4=0) +float x[] = {0.828957,0.675654,0.904170,0.191112,0.394521,0.706067,0.868924,0.547397,0.738959,0.932485,0.233119,0.926576,0.551443,0.933420,0.494407,0.552568,0.939129,0.799646,0.814139,0.594497,0.657201,0.995300,0.935852,0.324541,0.874309,0.589157,0.637771,0.759324,0.775421,0.794910,0.262785,0.604379,0.470564,0.166955} + +float h[] = {0.726144,0.746635,0.470674,0.211604,0.963092,0.264553,0.265818,0.725771,0.590649,0.313560,0.547613,0.946811,0.793753,0.690502,0.276120,0.792995,0.446645,0.327805,0.785346,0.676628} + +float y[] = {-0.641594,12.367426,-0.970113,12.963129,-0.466783,13.747334,0.637486,13.341836,-0.168561,14.091346,0.306652,15.018833,0.233741,14.726789,-0.011241,15.034849,0.000155,13.639509,0.558827,15.495646,-0.406179,14.103148,-0.000244,15.591370,-0.492319,14.785577} + + TEST COMPLEX SSE3 IMPLEMENTATION: (h_len%8=0) +float x[] = {0.828957,0.675654,0.904170,0.191112,0.394521,0.706067,0.868924,0.547397,0.738959,0.932485,0.233119,0.926576,0.551443,0.933420,0.494407,0.552568,0.939129,0.799646,0.814139,0.594497,0.657201,0.995300,0.935852,0.324541,0.874309,0.589157,0.637771,0.759324,0.775421,0.794910,0.262785,0.604379,0.470564,0.166955} + +float h[] = {0.726144,0.746635,0.470674,0.211604,0.963092,0.264553,0.265818,0.725771,0.590649,0.313560,0.547613,0.946811,0.793753,0.690502,0.276120,0.792995} + +float y[] = {-0.278295,10.097409,0.919633,11.502825,0.340383,10.979163,0.891132,11.679869,0.425363,11.186544,1.099703,12.121126,0.188196,11.180099,0.228905,12.436676,0.149904,11.522589,0.543155,11.703615,0.033465,12.425473,0.561782,12.373415,-0.218184,12.154579} + + + + TEST REAL BASE IMPLEMENTATION +float x[] = {0.828957,0.675654,0.904170,0.191112,0.394521,0.706067,0.868924,0.547397,0.738959,0.932485,0.233119,0.926576,0.551443,0.933420,0.494407,0.552568,0.939129,0.799646,0.814139,0.594497,0.657201,0.995300,0.935852,0.324541,0.874309,0.589157,0.637771,0.759324,0.775421,0.794910,0.262785,0.604379,0.470564,0.166955} + +float h[] = {0.726144,0.746635,0.470674,0.211604,0.963092,0.264553,0.265818,0.725771,0.590649,0.313560,0.547613,0.946811,0.793753,0.690502,0.276120,0.792995,0.446645} + +float y[] = {5.354852,5.387001,4.829278,5.046340,5.849788,5.775999,5.653334,5.372714,5.999860,5.593828,5.628739,5.178002,6.010774,6.186034,6.337766,5.538046,5.616131,6.289612,5.486091,5.835261,6.277413,5.894117,5.563587,6.082063,5.828556,6.160175} + + TEST REAL SSE3 IMPLEMENTATION (hlen=4) +float x[] =
[PATCH] osmo-trx[master]: ssedetect: Add runtime CPU detection
Review at https://gerrit.osmocom.org/2100 ssedetect: Add runtime CPU detection The current implementation can select the SSE support level during compiletime only. This commit adds functionality to automatically detect and switch the SSE support level and automatically switch the Implementation if the CPU does not support the required SSE level. Change-Id: Iba74f8a6e4e921ff31e4bd9f0c7c881fe547423a --- M Transceiver52M/arm/convolve.c M Transceiver52M/common/convert.h M Transceiver52M/common/convolve.h M Transceiver52M/osmo-trx.cpp M Transceiver52M/x86/convert.c M Transceiver52M/x86/convolve.c 6 files changed, 142 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/00/2100/1 diff --git a/Transceiver52M/arm/convolve.c b/Transceiver52M/arm/convolve.c index 2b42090..912d0c2 100644 --- a/Transceiver52M/arm/convolve.c +++ b/Transceiver52M/arm/convolve.c @@ -58,6 +58,13 @@ } #endif +/* API: Initalize convolve module */ +void convolve_init(void) +{ + /* Stub */ + return; +} + /* API: Aligned complex-real */ int convolve_real(float *x, int x_len, float *h, int h_len, diff --git a/Transceiver52M/common/convert.h b/Transceiver52M/common/convert.h index 4827c28..1d3a180 100644 --- a/Transceiver52M/common/convert.h +++ b/Transceiver52M/common/convert.h @@ -3,5 +3,6 @@ void convert_float_short(short *out, const float *in, float scale, int len); void convert_short_float(float *out, const short *in, int len); +void convert_init(void); #endif /* _CONVERT_H_ */ diff --git a/Transceiver52M/common/convolve.h b/Transceiver52M/common/convolve.h index 08bda0c..43db577 100644 --- a/Transceiver52M/common/convolve.h +++ b/Transceiver52M/common/convolve.h @@ -27,4 +27,6 @@ int start, int len, int step, int offset); +void convolve_init(void); + #endif /* _CONVOLVE_H_ */ diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 5e81586..dff482e 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -32,6 +32,11 @@ #include #include +extern "C" { +#include "convolve.h" +#include "convert.h" +} + /* Samples-per-symbol for downlink path * 4 - Uses precision modulator (more computation, less distortion) * 1 - Uses minimized modulator (less computation, more distortion) @@ -498,6 +503,9 @@ RadioDevice::InterfaceType iface = RadioDevice::NORMAL; struct trx_config config; + convolve_init(); + convert_init(); + handle_options(argc, argv, ); setup_signal_handlers(); diff --git a/Transceiver52M/x86/convert.c b/Transceiver52M/x86/convert.c index 862a2e7..db1c0fc 100644 --- a/Transceiver52M/x86/convert.c +++ b/Transceiver52M/x86/convert.c @@ -25,6 +25,17 @@ #include "config.h" #endif +/* Architecture dependant function pointers */ +struct convert_cpu_context { + void (*convert_si16_ps_16n) (float *, const short *, int); + void (*convert_si16_ps) (float *, const short *, int); + void (*convert_scale_ps_si16_16n)(short *, const float *, float, int); + void (*convert_scale_ps_si16_8n)(short *, const float *, float, int); + void (*convert_scale_ps_si16)(short *, const float *, float, int); +}; + +static struct convert_cpu_context c; + #ifdef HAVE_SSE3 #include #include @@ -157,53 +168,61 @@ _mm_storeu_si128((__m128i *) [16 * i + 8], m7); } } -#else /* HAVE_SSE3 */ +#endif + +__attribute__((optimize("no-tree-vectorize"))) static void convert_scale_ps_si16(short *out, const float *in, float scale, int len) { for (int i = 0; i < len; i++) out[i] = in[i] * scale; } -#endif -#ifndef HAVE_SSE4_1 +__attribute__((optimize("no-tree-vectorize"))) static void convert_si16_ps(float *out, const short *in, int len) { for (int i = 0; i < len; i++) out[i] = in[i]; } + +void convert_init(void) +{ + c.convert_scale_ps_si16_16n = convert_scale_ps_si16; + c.convert_scale_ps_si16_8n = convert_scale_ps_si16; + c.convert_scale_ps_si16 = convert_scale_ps_si16; + c.convert_si16_ps_16n = convert_si16_ps; + c.convert_si16_ps = convert_si16_ps; + +#ifdef HAVE_SSE4_1 + if (__builtin_cpu_supports("sse4.1")) { + c.convert_si16_ps_16n = &_sse_convert_si16_ps_16n; + c.convert_si16_ps = &_sse_convert_si16_ps; + } #endif + +#ifdef HAVE_SSE3 + if (__builtin_cpu_supports("sse3")) { + c.convert_scale_ps_si16_16n = _sse_convert_scale_ps_si16_16n; + c.convert_scale_ps_si16_8n = _sse_convert_scale_ps_si16_8n; + c.convert_scale_ps_si16 = _sse_convert_scale_ps_si16; + } +#endif +} void convert_float_short(short *out, const float *in, float scale, int len) { - void (*conv_func)(short *, const float *, float, int); - -#ifdef HAVE_SSE3 if (!(len %
osmo-trx[master]: Add test program to verify convolution implementation
Patch Set 1: it would be great if the tests would not only test the (fastest) one selected by default based on the CPU capabilies on the host running the test, but if we actaully executed all versions supported by the CPU, i.e. generic-C, SSE3 and SSE4.1 on modern systems. -- To view, visit https://gerrit.osmocom.org/2104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic702ecb356c652fbcd76bee689717fb5d3526fe9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-trx[master]: buildenv: Turn off native architecture builds
Review at https://gerrit.osmocom.org/2098 buildenv: Turn off native architecture builds The compiler option -march=native instructs the compiler to auto-optimize the code for the current build architecture. This is fine for building and using locally, but contraproductive when generating binary packages. This commit introduces more general options and also removes --with-sse from the default configure options and replaces them with $(SIMD_FLAGS), which also contains a collection of supported SIMD options, so we won't loose the SSE support. Change-Id: I3df4b8db9692016115edbe2247beeec090715687 --- M Transceiver52M/x86/Makefile.am M configure.ac 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/98/2098/1 diff --git a/Transceiver52M/x86/Makefile.am b/Transceiver52M/x86/Makefile.am index eda1a17..699faad 100644 --- a/Transceiver52M/x86/Makefile.am +++ b/Transceiver52M/x86/Makefile.am @@ -1,5 +1,5 @@ if !ARCH_ARM -AM_CFLAGS = -Wall -std=gnu99 -march=native -I${srcdir}/../common +AM_CFLAGS = -Wall -std=gnu99 $(SIMD_FLAGS) -I${srcdir}/../common noinst_LTLIBRARIES = libarch.la diff --git a/configure.ac b/configure.ac index f1159c6..7d7750e 100644 --- a/configure.ac +++ b/configure.ac @@ -113,7 +113,7 @@ ]) # Find and define supported SIMD extensions -AS_IF([test "x$with_sse" != "xno"], [ +AS_IF([test "x$with_sse" == "xyes"], [ AX_EXT ]) -- To view, visit https://gerrit.osmocom.org/2098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3df4b8db9692016115edbe2247beeec090715687 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: dexter
osmo-trx[master]: cosmetic: remove code duplication
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/2103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic8d8534a343e27cde79ddc85be4998ebd0cb6e5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmocore[master]: core/conv: implement optimized Viterbi decoder
Patch Set 4: That's a nitpicking of course, but maybe change the name to viterbi_common.c or viterbi_generic.c to avoid confusion with the generated files? -- To view, visit https://gerrit.osmocom.org/1337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No
libosmocore[master]: core/conv: implement optimized Viterbi decoder
Patch Set 5: @Harald: Ooops, I had completely missed the updated version, I'll check it out this weekend. -- To view, visit https://gerrit.osmocom.org/1337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No
osmo-hlr[master]: debug log: output ind slot, previous sqn, and sqn db update
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib86442ea45f6c1948b3d260f59d35bdca38fbd32 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] openbsc[master]: Don't drop OML links for Get Attributes NACK
Max has submitted this change and it was merged. Change subject: Don't drop OML links for Get Attributes NACK .. Don't drop OML links for Get Attributes NACK Previously any OML NACK message will result in BSC dropping OML link to BTS which makes it impossible to use optional OML messages which might be unsupported by BTS. Fix this for 3GPP TS 52.021 ยง8.11.1 Get Attributes message. Also, log human-readable NACK name to see what exactly causing OML link drop. Change-Id: Ib8af2872c27abb793172ec59bdc145b8d54f83da Related: OS#1614 --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index b17ff79..521fc89 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -44,19 +44,19 @@ /* Callback function for NACK on the OML NM */ static int oml_msg_nack(struct nm_nack_signal_data *nack) { - if (nack->mt == NM_MT_SET_BTS_ATTR_NACK) { - - LOGP(DNM, LOGL_ERROR, "Failed to set BTS attributes. That is fatal. " - "Was the bts type and frequency properly specified?\n"); - goto drop_bts; - } else { - LOGP(DNM, LOGL_ERROR, "Got a NACK going to drop the OML links.\n"); - goto drop_bts; + if (nack->mt == NM_MT_GET_ATTR_NACK) { + LOGP(DNM, LOGL_ERROR, "BTS%u does not support Get Attributes " +"OML message.\n", nack->bts->nr); + return 0; } - return 0; + if (nack->mt == NM_MT_SET_BTS_ATTR_NACK) + LOGP(DNM, LOGL_ERROR, "Failed to set BTS attributes. That is fatal. " +"Was the bts type and frequency properly specified?\n"); + else + LOGP(DNM, LOGL_ERROR, "Got %s NACK going to drop the OML links.\n", +abis_nm_nack_name(nack->mt)); -drop_bts: if (!nack->bts) { LOGP(DNM, LOGL_ERROR, "Unknown bts. Can not drop it.\n"); return 0; -- To view, visit https://gerrit.osmocom.org/2093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8af2872c27abb793172ec59bdc145b8d54f83da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max
[MERGED] osmo-hlr[master]: jenkins: add value_string termination check
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins: add value_string termination check .. jenkins: add value_string termination check Change-Id: I8cf15d898ef274c505cda0a6b8ddcbf01ba190d9 Depends: libosmocore change-id I2bc93ab4781487e7685cfb63091a489cd126b1a8 --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index c9cab3b..f2c9cbb 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -14,6 +14,9 @@ export LD_LIBRARY_PATH="$inst/lib" osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false + +"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + osmo-build-dep.sh libosmo-abis set +x -- To view, visit https://gerrit.osmocom.org/1955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cf15d898ef274c505cda0a6b8ddcbf01ba190d9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-tetra[master]: reformat README file as markdown
Review at https://gerrit.osmocom.org/2106 reformat README file as markdown Change-Id: I7b2602fa1614cafcfb6e6c4fad0d15ba183b0d1d --- R README.md 1 file changed, 31 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/06/2106/1 diff --git a/README b/README.md similarity index 68% rename from README rename to README.md index 30188a2..1b4b1ec 100644 --- a/README +++ b/README.md @@ -1,6 +1,7 @@ TETRA MAC/PHY layer experimentation code + + (C) 2010-2016 by Harald Welteand contributors -== This code aims to implement the sending and receiving part of the TETRA MAC/PHY layer. @@ -15,17 +16,21 @@ You will need libosmocore (http://bb.osmocom.org/trac/wiki/libosmocore) to link. -== Demodulator == +Demodulator +=== src/demod/python/cpsk.py - * contains a gnuradio based pi4/DQPSK demodulator, courtesy of KA1RBI + * contains a gnuradio based pi4/DQPSK demodulator, courtesy of KA1RBI + src/demod/python/osmosdr-tetra_demod_fft.py - * call demodulator on any source supported by gr-osmosdr - (uhd, fcd, hackrf, blaerf, etc.) + * call demodulator on any source supported by gr-osmosdr + (uhd, fcd, hackrf, blaerf, etc.) + src/demod/python/simdemod2.py - * call demodulator on a 'cfile' containing complex baseband samples + * call demodulator on a 'cfile' containing complex baseband samples + src/demod/python/{uhd,fcdp}-tetra_demod.py - * use demodulator directly with UHd or FCDP hadware (no gr-osmosdr) + * use demodulator directly with UHd or FCDP hadware (no gr-osmosdr) The output of the demodulator is a file containing one float value for each symbol, containing the phase shift (in units of pi/4) relative to the previous symbol. @@ -34,37 +39,41 @@ bits, i.e. 1-bit-per-byte -== PHY/MAC layer == +PHY/MAC layer += -=== library code === +library code + Specifically, it implements: lower_mac/crc_simple.[ch] - * CRC16-CCITT (currently defunct/broken as we need it for - non-octet-aligned bitfields) +* CRC16-CCITT (currently defunct/broken as we need it for + non-octet-aligned bitfields) lower_mac/tetra_conv_enc.[ch] - * 16-state Rate-Compatible Punctured Convolutional (RCPC) coder +* 16-state Rate-Compatible Punctured Convolutional (RCPC) coder lower_mac/tetra_interleave.[ch] - * Block interleaving (over a single block only) +* Block interleaving (over a single block only) lower_mac/tetra_rm3014.[ch] - * (30, 14) Reed-Muller code for the ACCH (broadcast block of - each downlink burst) +* (30, 14) Reed-Muller code for the ACCH (broadcast block of + each downlink burst) lower_mac/tetra_scramb.[ch] - * Scrambling +* Scrambling lower_mac/viterbi*.[ch] - * Convolutional decoder for signalling and voice channels +* Convolutional decoder for signalling and voice channels phy/tetra_burst.[ch] - * Routines to encode continuous normal and sync bursts +* Routines to encode continuous normal and sync bursts phy/tetra_burst_sync.[ch] -=== Receiver Program === +Receiver Program + The main receiver program 'tetra-rx' expects an input file containing a stream of unpacked bits, i.e. 1-bit-per-byte. -=== Transmitter Program === +Transmitter Program +--- The main program conv_enc_test.c generates a single continuous downlinc sync burst (SB), contining: @@ -77,7 +86,8 @@ It does not actually modulate and/or transmit yet. -== Quick example == +Quick example += # assuming you have generated a file samples.cfile at a sample rate of # 195.312kHz (100MHz/512 == USRP2 at decimation 512) -- To view, visit https://gerrit.osmocom.org/2106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b2602fa1614cafcfb6e6c4fad0d15ba183b0d1d Gerrit-PatchSet: 1 Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Owner: Harald Welte
[PATCH] osmo-tetra[master]: README.md: Add general information about the project
Review at https://gerrit.osmocom.org/2107 README.md: Add general information about the project Change-Id: I3e187676a2c1ceb305f97e95d906659609135068 --- M README.md 1 file changed, 44 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/07/2107/1 diff --git a/README.md b/README.md index 1b4b1ec..818e78c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,50 @@ It is most useful to look at Figure 8.5, 8.6, 9.3 and 19.12 in conjunction with this program. -You will need libosmocore (http://bb.osmocom.org/trac/wiki/libosmocore) to link. +You will need +[libosmocore](https://osmocom.org/projects/libosmocore/wiki/Libosmocore) +to build this softwar + +Homepage + + +The official homepage of the project is +https://osmocom.org/projects/tetra/wiki/OsmocomTETRA + +GIT Repository +-- + +You can clone from the official osmo-tetra.git repository using + + git clone git://git.osmocom.org/osmo-tetra.git + +There is a cgit interface at http://git.osmocom.org/osmo-tetra/ + +Mailing List + + +Discussions related to osmo-tetra are happening on the +te...@lists.osmocom.org mailing list, please see +https://lists.osmocom.org/mailman/listinfo/tetra for subscription +options and the list archive. + +Please observe the [Osmocom Mailing List +Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules) +when posting. + +Contributing + + +Our coding standards are described at +https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards + +We us a gerrit based patch submission/review process for managing +contributions. Please see +https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for +more details + +The current patch queue for osmo-tetra can be seen at +https://gerrit.osmocom.org/#/q/project:osmo-tetra+status:open Demodulator -- To view, visit https://gerrit.osmocom.org/2107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e187676a2c1ceb305f97e95d906659609135068 Gerrit-PatchSet: 1 Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Owner: Harald Welte
osmo-sip-connector[master]: jenkins: add value_string termination check
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic247005aeeabdf349caf48657af0249da8c8d9ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmo-abis[master]: Add README file to libosmo-abis repository
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76ced414b22637792389fcf79ae6c7159502259b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmo-netif[master]: stream: When destroying, make sure to kill reconnect timer
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6597130f472f1e2b8d9682002250ecd54675bb0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmo-netif[master]: stream_client: Actually use/honor the reconect parameter
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I817e026404cbd9145cae2ce90bc57a1db1d2e12b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmo-netif[master]: stream: don't crash in _close() when fd is not initialized
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3aa04999ab01cb7971ee2dad45dfc31ab4142868 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-hlr[master]: UMTS AKA: implement SQN increment according to SEQ and IND
Harald Welte has submitted this change and it was merged. Change subject: UMTS AKA: implement SQN increment according to SEQ and IND .. UMTS AKA: implement SQN increment according to SEQ and IND Add ind_bitlen column to auc_3g to record each USIM's IND size according to 3GPP TS 33.102 -- default is 5 bits, as suggested by the spec. Introduce auc_3g_ind to each connecting GSUP client to use as IND index for generating auth tuples sent to this client. With osmo_gsup_server_add_conn(), implement a scheme where clients receive fixed auc_3g_ind indexes based on the order in which they connect; each new connection takes the lowest unused auc_3g_ind, so in case one of the clients restarts, it will most likely receive the same auc_3g_ind, and if one client disconnects, no other clients' auc_3g_ind are affected. Add gsup_server_test.c to test the auc_3g_ind index distribution scheme. Depends: libosmocore I4eac5be0c0b2cede04464c4c3a0873102d952453 for llist_first Related: OS#1969 Change-Id: If4501ed4ff8e923fa6fe8b80c44c5ad647a8ed60 --- M configure.ac M sql/hlr.sql M src/db.c M src/db.h M src/db_auc.c M src/db_test.c M src/gsup_server.c M src/gsup_server.h M src/hlr.c M tests/Makefile.am A tests/gsup_server/Makefile.am A tests/gsup_server/gsup_server_test.c A tests/gsup_server/gsup_server_test.err A tests/gsup_server/gsup_server_test.ok M tests/testsuite.at 15 files changed, 354 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index a04185f..958b48b 100644 --- a/configure.ac +++ b/configure.ac @@ -50,4 +50,5 @@ tests/Makefile tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/Makefile + tests/gsup_server/Makefile ) diff --git a/sql/hlr.sql b/sql/hlr.sql index 9238871..5fbc712 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -63,7 +63,8 @@ k VARCHAR(32) NOT NULL, -- hex string: subscriber's secret key (128bit) op VARCHAR(32),-- hex string: operator's secret key (128bit) opc VARCHAR(32),-- hex string: derived from OP and K (128bit) - sqn INTEGER NOT NULL DEFAULT 0 -- sequence number of key usage + sqn INTEGER NOT NULL DEFAULT 0, -- sequence number of key usage + ind_bitlen INTEGER NOT NULL DEFAULT 5 -- nr of index bits at lower SQN end ); CREATE UNIQUE INDEX IF NOT EXISTS idx_subscr_imsi ON subscriber (imsi); diff --git a/src/db.c b/src/db.c index aa4726c..aaf6fe2 100644 --- a/src/db.c +++ b/src/db.c @@ -29,7 +29,7 @@ [SEL_BY_IMSI] = "SELECT id,imsi,msisdn,vlr_number,sgsn_number,sgsn_address,periodic_lu_tmr,periodic_rau_tau_tmr,nam_cs,nam_ps,lmsi,ms_purged_cs,ms_purged_ps FROM subscriber WHERE imsi = ?", [UPD_VLR_BY_ID] = "UPDATE subscriber SET vlr_number = ? WHERE id = ?", [UPD_SGSN_BY_ID] = "UPDATE subscriber SET sgsn_number = ? WHERE id = ?", - [AUC_BY_IMSI] = "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn FROM subscriber LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id WHERE imsi = ?", + [AUC_BY_IMSI] = "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen FROM subscriber LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id WHERE imsi = ?", [AUC_UPD_SQN] = "UPDATE auc_3g SET sqn = ? WHERE subscriber_id = ?", [UPD_PURGE_CS_BY_IMSI] = "UPDATE subscriber SET ms_purged_cs=1 WHERE imsi = ?", [UPD_PURGE_PS_BY_IMSI] = "UPDATE subscriber SET ms_purged_ps=1 WHERE imsi = ?", diff --git a/src/db.h b/src/db.h index 0b3df88..a60cf62 100644 --- a/src/db.h +++ b/src/db.h @@ -39,8 +39,9 @@ uint64_t new_sqn); int db_get_auc(struct db_context *dbc, const char *imsi, - struct osmo_auth_vector *vec, unsigned int num_vec, - const uint8_t *rand_auts, const uint8_t *auts); + unsigned int auc_3g_ind, struct osmo_auth_vector *vec, + unsigned int num_vec, const uint8_t *rand_auts, + const uint8_t *auts); #include #include diff --git a/src/db_auc.c b/src/db_auc.c index ac81404..8a369b5 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -159,6 +159,7 @@ aud3g->u.umts.opc_is_op = 1; } aud3g->u.umts.sqn = sqlite3_column_int64(stmt, 7); + aud3g->u.umts.ind_bitlen = sqlite3_column_int(stmt, 8); /* FIXME: amf? */ aud3g->type = OSMO_AUTH_TYPE_UMTS; } else @@ -186,8 +187,9 @@ /* return -1 in case of error, 0 for unknown imsi, positive for number * of vectors generated */ int db_get_auc(struct db_context *dbc, const char *imsi, - struct osmo_auth_vector
osmo-pcu[master]: Add support for sending OML Alerts via BTS
Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/2071/1/src/encoding.cpp File src/encoding.cpp: Line 380: pcu_tx_txt_ind(PCU_OML_ALERT, "PCU: length of IMM.ASS without " we are sending the message over the PCU socket, so it is clear that it originates from the PCU. Any forwarding of this message from BTS to BSC should preserve this information (originating from PCU, not from BTS) in machine-parseable way somehow. And before it is printed, the printer can use this to prefix with PCU. I don't like to have a "PCU:" string here. and have other code in other network elements rely on it. -- To view, visit https://gerrit.osmocom.org/2071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4ea5b3f7409df2fb030681ad468df6b711790a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes
[PATCH] libosmo-netif[master]: stream_client: Actually use/honor the reconect parameter
Review at https://gerrit.osmocom.org/2110 stream_client: Actually use/honor the reconect parameter The reconnect behavior was likely broken in commit de3f57a8293a5b39435d6f283da23e0172bad8bb If the user requests a re-connect, we should start it. Not only in case the connection drops later, but also if the initial connection itself fails. Change-Id: I817e026404cbd9145cae2ce90bc57a1db1d2e12b --- M src/stream.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/10/2110/1 diff --git a/src/stream.c b/src/stream.c index a30fd04..d72d800 100644 --- a/src/stream.c +++ b/src/stream.c @@ -308,8 +308,11 @@ ret = osmo_sock_init(AF_INET, SOCK_STREAM, cli->proto, cli->addr, cli->port, OSMO_SOCK_F_CONNECT); - if (ret < 0) + if (ret < 0) { + if (reconnect && errno == ECONNREFUSED) + osmo_stream_cli_reconnect(cli); return ret; + } cli->ofd.fd = ret; if (osmo_fd_register(>ofd) < 0) { -- To view, visit https://gerrit.osmocom.org/2110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I817e026404cbd9145cae2ce90bc57a1db1d2e12b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte
libosmocore[master]: logging: fail gracefully if log_info() was not called
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3007860d2efe6ea9aec27e7d7439d44a7cd19c2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-hlr[master]: debug log: output ind slot, previous sqn, and sqn db update
Harald Welte has submitted this change and it was merged. Change subject: debug log: output ind slot, previous sqn, and sqn db update .. debug log: output ind slot, previous sqn, and sqn db update Change-Id: Ib86442ea45f6c1948b3d260f59d35bdca38fbd32 --- M src/auc.c M src/db_auc.c M tests/auc/auc_test.err M tests/auc/auc_ts_55_205_test_sets.err 4 files changed, 30 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/auc.c b/src/auc.c index d3b3d36..f55b377 100644 --- a/src/auc.c +++ b/src/auc.c @@ -97,6 +97,8 @@ DBGP("3G: %s = %s\n", aud3g->u.umts.opc_is_op? "OP" : "opc", hexb(aud3g->u.umts.opc)); + DBGP("3G: for sqn ind %u, previous sqn was %" PRIu64 "\n", +aud3g->u.umts.ind, aud3g->u.umts.sqn); } if (aud2g) DBGP("2G: ki = %s\n", hexb(aud2g->u.gsm.ki)); diff --git a/src/db_auc.c b/src/db_auc.c index 8a369b5..f532b83 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -223,7 +223,8 @@ /* Update SQN in database, as needed */ if (aud3g.algo) { - LOGAUC(imsi, LOGL_DEBUG, "Updating SQN in DB\n"); + LOGAUC(imsi, LOGL_DEBUG, "Updating SQN=%" PRIu64 " in DB\n", + aud3g.u.umts.sqn); rc = db_update_sqn(dbc, subscr_id, aud3g.u.umts.sqn); /* don't tell caller we generated any triplets in case of * update error */ diff --git a/tests/auc/auc_test.err b/tests/auc/auc_test.err index 8748ece..5263d04 100644 --- a/tests/auc/auc_test.err +++ b/tests/auc/auc_test.err @@ -26,6 +26,7 @@ DAUC Computing 1 auth vector: 3G + separate 2G DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC 2G: ki = eb215756028d60e3275e613320aec880 DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d DAUC vector [0]: sqn = 32 @@ -45,6 +46,7 @@ DAUC Computing 1 auth vector: 3G + separate 2G DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC 2G: ki = eb215756028d60e3275e613320aec880 DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d DAUC vector [0]: sqn = 32 @@ -68,6 +70,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys) DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d DAUC vector [0]: sqn = 32 DAUC vector [0]: autn = 8704f5ba55d3541dde77ea5b1d8c @@ -85,6 +88,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys) DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC vector [0]: rand = 39fa2f4e3d523d8619a73b4f65c3e14d DAUC vector [0]: sqn = 32 DAUC vector [0]: autn = 8704f5ba55d3541dde77ea5b1d8c @@ -103,6 +107,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys), with AUTS resync DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f DAUC vector [0]: resync: auts = 979498b1f72d3e28c59fa2e72f9c DAUC vector [0]: resync: rand_auts = 39fa2f4e3d523d8619a73b4f65c3e14d @@ -124,6 +129,7 @@ DAUC Computing 3 auth vectors: 3G only (2G derived from 3G keys) DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 23 DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f DAUC vector [0]: sqn = 24 DAUC vector [0]: autn = c6b9790dad4b0cf322869ea6a481 @@ -163,6 +169,7 @@ DAUC Computing 3 auth vectors: 3G only (2G derived from 3G keys), with AUTS resync DAUC 3G: k = eb215756028d60e3275e613320aec880 DAUC 3G: opc = fb2a3d1b360f599abab99db8669f8308 +DAUC 3G: for sqn ind 0, previous sqn was 26 DAUC vector [0]: rand = 897210a0f7de278f0b8213098e098a3f DAUC vector [0]: resync: auts = 979498b1f72d3e28c59fa2e72f9c DAUC vector [0]: resync: rand_auts = 39fa2f4e3d523d8619a73b4f65c3e14d diff --git a/tests/auc/auc_ts_55_205_test_sets.err b/tests/auc/auc_ts_55_205_test_sets.err index 3037d2f..1c5ad60 100644 --- a/tests/auc/auc_ts_55_205_test_sets.err +++ b/tests/auc/auc_ts_55_205_test_sets.err @@ -4,6 +4,7 @@ DAUC Computing 1 auth vector: 3G only (2G derived from 3G keys) DAUC 3G: k = 465b5ce8b199b49faa5f0a2ee238a6bc DAUC 3G: opc = cd63cb71954a9f4e48a5994e37a02baf +DAUC 3G: for sqn ind 0, previous sqn was 31 DAUC vector [0]: rand = 23553cbe9637a89d218ae64dae47bf35 DAUC vector [0]: sqn = 32 DAUC vector [0]: autn = aa689c6483502bb2bf2f1faba139 @@ -25,6
[MERGED] libosmocore[master]: auth_milenage: fix check against too large ind
Harald Welte has submitted this change and it was merged. Change subject: auth_milenage: fix check against too large ind .. auth_milenage: fix check against too large ind To ensure that the IND index appended to SEQ does not affect the SEQ, the check should read '>= seq_1', not '>'. Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8 --- M src/gsm/auth_milenage.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c index f151c5e..c1331b5 100644 --- a/src/gsm/auth_milenage.c +++ b/src/gsm/auth_milenage.c @@ -94,7 +94,7 @@ ind_mask = ~(seq_1 - 1); /* the ind index must not affect the SEQ part */ - if (aud->u.umts.ind > seq_1) + if (aud->u.umts.ind >= seq_1) return -3; /* keep the incremented SQN local until gsm_milenage() succeeded. */ -- To view, visit https://gerrit.osmocom.org/2092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder