diff mbox

[2/2] nitb: Add a mode to not use TMSI for normal operation

Message ID 55B78148.4010608@autistici.org
State Accepted
Headers show

Commit Message

Ciaby July 28, 2015, 1:19 p.m. UTC
On 07/14/2015 01:32 PM, Holger Hans Peter Freyther wrote:
> From: Holger Hans Peter Freyther <holger@moiji-mobile.com>
> 
> In case foreign simcards are used we can not do authentication
> and ciphering. In case a TMSI is re-used too early and we do
> page using TMSI we can't know which of the two MS is responding
> to us. We could change the "secure channel" routine to ask for
> the IMSI and only then stop the paging.
> 
> As we don't have ciphering there is not much use in using the
> TMSI. Add a mode "no assign-tmsi" that will not assign the TMSI
> during LU. Now CM Service Request and Paging Response  will
> work using the IMSI. There can't be a clash with that.
[...]
>  static int config_write_nitb(struct vty *vty)
>  {
>  	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
>  	vty_out(vty, "nitb%s", VTY_NEWLINE);
>  	vty_out(vty, " %ssubscriber-create-on-demand%s",
>  		gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE);
> +	vty_out(vty, " %suse-tmsi%s",
> +		gsmnet->avoid_tmsi ? "no" : "", VTY_NEWLINE);
>  	return CMD_SUCCESS;
>  }
This part is broken. Whenever you try to set it it will put "use-tmsi"
instead of "assign-tmsi". The moment you save it and restart, it barfs
on the "use-tmsi" line. If you put a no in front, it will be saved as
"nouse-tmsi". I fixed both problems with the attached patch.
Cheers

Ciaby

Comments

Holger Freyther July 28, 2015, 2:51 p.m. UTC | #1
> On 28 Jul 2015, at 15:19, Ciaby <ciaby@autistici.org> wrote:
> 
> This part is broken. Whenever you try to set it it will put "use-tmsi"
> instead of "assign-tmsi". The moment you save it and restart, it barfs
> on the "use-tmsi" line. If you put a no in front, it will be saved as
> "nouse-tmsi". I fixed both problems with the attached patch.

oops and sorry, when trying to move quickly. The bigger question is why
this passed on the CI. I always write the yes/no case so it should fail.

Did your reports on wrongly connected calls go down?

holger
Ciaby July 29, 2015, 3:44 p.m. UTC | #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 07/28/2015 04:51 PM, Holger Freyther wrote:
> 
>> On 28 Jul 2015, at 15:19, Ciaby <ciaby@autistici.org> wrote:
>> 
>> This part is broken. Whenever you try to set it it will put
>> "use-tmsi" instead of "assign-tmsi". The moment you save it and
>> restart, it barfs on the "use-tmsi" line. If you put a no in
>> front, it will be saved as "nouse-tmsi". I fixed both problems
>> with the attached patch.
> 
> oops and sorry, when trying to move quickly. The bigger question is
> why this passed on the CI. I always write the yes/no case so it
> should fail.
> 
> Did your reports on wrongly connected calls go down?
I just deployed a new version of OpenBSC with the latest fixes.
I'll let you know soon the results :)
Cheers

Ciaby


-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJVuPTCAAoJEPU83OtbD4fQeGEP+gPlMW1aU48smkt/dQkIE55e
ePxLuFf/gJXvWkX/I3KO2PtswAUUnHULByMofKtTrWO8TD1NDG6pOwYn8Gj0S/T+
sB8PuvzqCergUnoZHeio7Jz17esIha3uAtIjuWcbQcO18Vo9XIa6KXl1GENq/82t
4/KdvmDFBHl1O5UweABJgGVfPcHWr0cdZtj3cFlXGsLBDpBDfjQ8cGFtpNfPTW00
bOp68xxFuxLZAShb+uSPaNhcx62i/hOoTCi9818HqFbuBddj8z4nIoP6IB1u9dwh
stk42DN1GGRn1Nb95N4A2yVZq/ehhcxGxcCHO3D+izgr5sYsLKgYHbe8ATw58GDx
PNultYG8ejCxt4sBPNyeFjhA/QjNDm+Oq6bcBXG7JqWffAKix57myU6S9HdHxQDX
b7Zj0oUFhHVBRTgqgPxbzYz7A9bM+nfp3a76pFOH2rOozflQLXa25Da6s/ImS0Ft
kuoGn9VzTMIZkTfnsiPrHdJurINUDnzl1UJUi3GuvhUepMixRIWZk+9vqwAxsyu9
ddgHGOego4g0exHptmGr3FJ5zF1tDfkGFCZFrR+Sj/t89VTCrS0bGONguMfb2f8i
Mt2XjQ/IkEQX4KqpiHURv75OmwcglqP+nEHi1sMS8nIL5PkoYJctouKqQ861snIP
to5FgDM0hvpIqyzay/QT
=bOWp
-----END PGP SIGNATURE-----
Holger Freyther Aug. 5, 2015, 5:42 p.m. UTC | #3
> On 28 Jul 2015, at 16:51, Holger Freyther <holger@freyther.de> wrote:
> 
> 
> oops and sorry, when trying to move quickly. The bigger question is why
> this passed on the CI. I always write the yes/no case so it should fail.

the code wasn’t in master yet.. so that is why it didn’t go through the
CI and didn’t trigger a build error :)
diff mbox

Patch

From 255e7c09f243f61e9381ad7702cbfbe3cd1b9f34 Mon Sep 17 00:00:00 2001
From: Ciaby <ciaby@rhizomatica.org>
Date: Tue, 28 Jul 2015 08:11:29 -0500
Subject: [PATCH] nitb: Rename "use-tmsi" into "assign-tmsi", add a missing
 space after "no"

---
 openbsc/src/libmsc/vty_interface_layer3.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 3c33ffc..1515aea 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -1061,8 +1061,8 @@  static int config_write_nitb(struct vty *vty)
 	vty_out(vty, "nitb%s", VTY_NEWLINE);
 	vty_out(vty, " %ssubscriber-create-on-demand%s",
 		gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE);
-	vty_out(vty, " %suse-tmsi%s",
-		gsmnet->avoid_tmsi ? "no" : "", VTY_NEWLINE);
+	vty_out(vty, " %sassign-tmsi%s",
+		gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE);
 	return CMD_SUCCESS;
 }
 
-- 
1.7.9.5