openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop

Alexander Chemeris gerrit-no-reply at
Mon Oct 30 20:42:49 UTC 2017

Patch Set 5: Code-Review-1

(1 comment)

We hit this issue in one of our installations, so I'm glad to see a work to resolve this. In that case though, we just increased the length of the automatically generated extensions to make sure they never overflow.
File openbsc/src/libmsc/db.c:

Line 1425: 		"WHERE extension IS NOT NULL");
This way of counting will give wrong results when you have a mix of automatically assigned extension numbers and manually assigned ones (with a different length) like we have in some of our installations. You can probably limit the SELECT here to extensions of a given length or between MIN and MAX to make this more robust.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42
Gerrit-PatchSet: 5
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte <keith at>
Gerrit-Reviewer: Alexander Chemeris <Alexander.Chemeris at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Ivan Kluchnikov <kluchnikovi at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <keith at>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at>
Gerrit-HasComments: Yes

More information about the gerrit-log mailing list