Dear LaF0rge, Andreas,
I am really disappointed about the used process for this change. As
an absolute minimum run "make check" after bigger changes. The run
takes about 20 seconds (and that is probably 15s in the timer test),
I have to spend way more time fixing the fall-out from that and it
creates the impression that you do not value my time!
I think Andreas should have posted this kind of change to the mailing
list and ask for review. The way it was done is really unacceptable
and the build is still broken. And to make it worse I think the change
is wrong in several ways:
1.) The issue of the last '7bit' being 'empty' only applies to USSD/CB:
"If the total number of characters to be sent equals (8n-1) where
n=1,2,3 etc. then there are 7 spare bits at the end of the message.
To avoid the situation where the receiving entity confuses 7 binary
zero pad bits as the @ character, the carriage return or <CR> character
(defined in subclause 7.1.1) shall be used for padding in this situation,
just as for Cell Broadcast."
In SMS one has both the octet length and the character length inside
the messages. In USSD this information is not present.
2.) The semantic of the change is bad.
+ octet_len = response_len*7/8;
+ if (response_len*7%8 != 0)
+ octet_len++;
+ /* Warning, response_len indicates the amount of septets
+ * (characters), we need amount of octets occupied */
Every caller of gsm_7bit_encode now needs to consider adding this change,
it is better to move this into gsm_utils.c. E.g. take a look at my branch
called zecke/features/alpha-numeric for a gsm_7bit_encode_oct. Which
comes with a testcase... and moves this responsibility into libosmocore
and is based on the real octets written (instead of trying to figure it
our afterwards).
We all make money by working on Osmocom sub-projects and I really can't
stand such amateurish work. Can we force reset master to before the merge
and try again?
cheers
holger
Hi
in order to decode Cipher Mode Command from Alcatel S-12, please accept a
patch to gsm0808.c
Without it OpenBSC rejects ciphering, and procedures are broken from MSC
side
@@ -305,6 +305,7 @@
[GSM0808_IE_CELL_IDENTIFIER] = { TLV_TYPE_TLV },
[GSM0808_IE_CHOSEN_CHANNEL] = { TLV_TYPE_TV },
[GSM0808_IE_LAYER_3_INFORMATION] = { TLV_TYPE_TLV },
+ [GSM0808_IE_LAYER_3_HEADER_INFORMATION] = { TLV_TYPE_TLV
},
[GSM0808_IE_SPEECH_VERSION] = { TLV_TYPE_TV },
[GSM0808_IE_CHOSEN_ENCR_ALG] = { TLV_TYPE_TV },
},
Right now there is a pilot with MNO, and Telscale SS7 Card runs code for
A-interface gateway,
converting BSSAP/SS7 to SCCPoverIP + rtp.
It seems that such a gateway also has to adapt OpenBSC to each particular
MSC.
As an example, DTAP portion of Cipher Mode Complete must be removed for
proper operation with S12.
Code will published as soon as pilot succeeds.
Best Regards,
Dmitri
hi,
while trying to do a second call (hold the first, dial another number),
i found out that there is no acknowledge for a CM service request, when
encyption is enabled. the attached patch will fix it.
regards,
andreas
Hi everyone,
I have to setup a complete call with voice support and also a complete working GPRS network with just simulation and no physical base station, is it achievable?
It would be great if someone could enlighten me on this.
Thanks and regards,
Priyanka
I have FINALLY gotten to play with my sysmoBTS acquired many months ago,
and updated to the latest packages using okpg, and am running a NITB.
GSM850 test setup in open mode A5/0, and I can SMS and call between devices.
However, there is no audio, and BTS console logs reports many repeats of
the following during an established call.
<0006> tch.c:601 (bts=0,trx=0,ts=7,ss=0) Rx Payload Type EFR is unsupported
<0006> tch.c:601 (bts=0,trx=0,ts=7,ss=0) Rx Payload Type EFR is unsupported
<0006> tch.c:601 (bts=0,trx=0,ts=7,ss=0) Rx Payload Type EFR is unsupported
A CM service request must be acknowledged also, when encryption is already
enabled.
Without encryption enabled, the security status is GSM_SECURITY_NOTAVAIL,
which causes a CM service acknowledge. On initial CM service request, the
security status is GSM_SECURITY_SUCCEED, if encryption is enabled. This
will not lead to an acknowledge, because the cyphering command implies an
acknowlege. An additional CM service request requires an acknowledge, so
I added a new security status: GSM_SECURITY_ALREADY
---
openbsc/include/openbsc/gsm_data.h | 1 +
openbsc/src/libmsc/gsm_04_08.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index d7db887..05e0490 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -21,6 +21,7 @@ enum gsm_security_event {
GSM_SECURITY_NOAVAIL,
GSM_SECURITY_AUTH_FAILED,
GSM_SECURITY_SUCCEEDED,
+ GSM_SECURITY_ALREADY,
};
struct msgb;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 58107e3..2ce0e8c 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -194,7 +194,7 @@ int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq,
status = GSM_SECURITY_NOAVAIL;
} else if (conn->lchan->encr.alg_id > RSL_ENC_ALG_A5(0)) {
DEBUGP(DMM, "Requesting to secure an already secure channel");
- status = GSM_SECURITY_SUCCEEDED;
+ status = GSM_SECURITY_ALREADY;
} else if (!ms_cm2_a5n_support(subscr->equipment.classmark2,
net->a5_encryption)) {
DEBUGP(DMM, "Subscriber equipment doesn't support requested encryption");
@@ -856,6 +856,7 @@ static int _gsm48_rx_mm_serv_req_sec_cb(
break;
case GSM_SECURITY_NOAVAIL:
+ case GSM_SECURITY_ALREADY:
rc = gsm48_tx_mm_serv_ack(conn);
break;
--
1.8.1.5
--------------030304030609050702010202--
A CM service request must be acknowledged also, when encryption is already
enabled.
Without encryption enabled, the security status is GSM_SECURITY_NOTAVAIL,
which causes a CM service acknowledge. On initial CM service request, the
security status is GSM_SECURITY_SUCCEED, if encryption is enabled. This
will not lead to an acknowledge, because the cyphering command implies an
acknowlege. An additional CM service request requires an acknowledge, so
I added a new security status: GSM_SECURITY_ALREADY
---
openbsc/include/openbsc/gsm_data.h | 1 +
openbsc/src/libmsc/gsm_04_08.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index d7db887..05e0490 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -21,6 +21,7 @@ enum gsm_security_event {
GSM_SECURITY_NOAVAIL,
GSM_SECURITY_AUTH_FAILED,
GSM_SECURITY_SUCCEEDED,
+ GSM_SECURITY_ALREADY,
};
struct msgb;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 58107e3..3725eb9 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -194,7 +194,7 @@ int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq,
status = GSM_SECURITY_NOAVAIL;
} else if (conn->lchan->encr.alg_id > RSL_ENC_ALG_A5(0)) {
DEBUGP(DMM, "Requesting to secure an already secure channel");
- status = GSM_SECURITY_SUCCEEDED;
+ status = GSM_SECURITY_ALREADY;
} else if (!ms_cm2_a5n_support(subscr->equipment.classmark2,
net->a5_encryption)) {
DEBUGP(DMM, "Subscriber equipment doesn't support requested encryption");
@@ -302,6 +302,11 @@ static int _gsm0408_authorize_sec_cb(unsigned int hooknum, unsigned int event,
release_loc_updating_req(conn);
break;
+ case GSM_SECURITY_ALREADY:
+ LOGP(DMM, LOGL_ERROR, "We don't expect LOCATION "
+ "UPDATING after CM SERVICE REQUEST\n");
+ /* fall through */
+
case GSM_SECURITY_NOAVAIL:
case GSM_SECURITY_SUCCEEDED:
/* We're all good */
@@ -856,6 +861,7 @@ static int _gsm48_rx_mm_serv_req_sec_cb(
break;
case GSM_SECURITY_NOAVAIL:
+ case GSM_SECURITY_ALREADY:
rc = gsm48_tx_mm_serv_ack(conn);
break;
--
1.8.1.5
--------------040306030909000104060200--
lapdm.c takes the re-establishment message and forwards it to lapd_core.c,
so we can assume that msgb is set at primitive. In case there is data in
the re-establishment msg, it is moved into send_buffer. In case of no
data (0 length), it must be freed.
---
src/gsm/lapd_core.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index 68b5e78..08143ed 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -1962,11 +1962,13 @@ static int lapd_res_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
if (dl->send_buffer)
msgb_free(dl->send_buffer);
dl->send_out = 0;
- if (msg && msg->len)
+ if (msg->len) {
/* Write data into the send buffer, to be sent first */
dl->send_buffer = msg;
- else
+ } else {
+ msgb_free(msg);
dl->send_buffer = NULL;
+ }
/* Discard partly received L3 message */
if (dl->rcv_buffer) {
--
1.7.3.4
--------------030109030604040502010001--