openbsc[master]: Add regexp authorization policy for IMSI

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Wed May 25 19:52:21 UTC 2016


Patch Set 1: Code-Review-1

(4 comments)

https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/bsc_vty.c
File openbsc/src/libbsc/bsc_vty.c:

Line 1411:       "Use regular expression for IMSI authorization decision\n"
tabs vs. spaces. Yes the rest is inconsistent but please use tabs here.


https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/net_init.c
File openbsc/src/libbsc/net_init.c:

Line 52: 	net->authorized_reg_str = NULL;
you can omit it. We rely on talloc_zero for many of these things. You don't need to omit it though.


https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libmsc/gsm_04_08.c
File openbsc/src/libmsc/gsm_04_08.c:

Line 255: 	if (regexec(&net->authorized_regexp, imsi, 0, NULL, 0) != REG_NOMATCH)
just return it?


Line 538: 	return subscr_create_subscriber(net->subscr_group, imsi);
Do you want to have authorized = 1; here as well or rely on the regexp being called every time?


-- 
To view, visit https://gerrit.osmocom.org/104
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I525f4b80676de47d1d422686da2ca012301b0129
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes



More information about the OpenBSC mailing list