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/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12404 Change subject: err log: fully log MS supported A5 algos on mismatch ...................................................................... err log: fully log MS supported A5 algos on mismatch Change-Id: Icb18e0f0bb420de066e7eb8fc683f192ba2a7368 --- M src/libmsc/gsm_04_08.c 1 file changed, 38 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/12404/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 9370c56..bd6ea79 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -118,6 +118,41 @@ return classmark2_is_r99(cm->classmark2, cm->classmark2_len); } +static const char *classmark_a5_name(const struct gsm_classmark *cm) +{ + static char buf[128]; + char cm1[42]; + char cm2[42]; + char cm3[42]; + + if (cm->classmark1_set) + snprintf(cm1, sizeof(cm1), " cm1{a5/1=%s}", + cm->classmark1.a5_1 ? "not-supported":"supported" /* inverted logic */); + else + snprintf(cm1, sizeof(cm1), " no-cm1"); + + if (cm->classmark2_len >= 3) + snprintf(cm2, sizeof(cm2), " cm2{0x%x=%s%s}", + cm->classmark2[2], + cm->classmark2[2] & 0x1 ? " A5/2" : "", + cm->classmark2[2] & 0x2 ? " A5/3" : ""); + else + snprintf(cm2, sizeof(cm2), " no-cm2"); + + if (cm->classmark3_len >= 1) + snprintf(cm3, sizeof(cm3), " cm3{0x%x=%s%s%s%s}", + cm->classmark3[0], + cm->classmark3[0] & (1 << 0) ? " A5/4" : "", + cm->classmark3[0] & (1 << 1) ? " A5/5" : "", + cm->classmark3[0] & (1 << 2) ? " A5/6" : "", + cm->classmark3[0] & (1 << 3) ? " A5/7" : ""); + else + snprintf(cm3, sizeof(cm3), " no-cm3"); + + snprintf(buf, sizeof(buf), "%s%s%s", cm1, cm2, cm3); + return buf; +} + /* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher. * Return 1 when the given A5/n is permitted, 0 when not, and negative if the respective MS CLASSMARK is * not known, where the negative number indicates the classmark type: -2 means Classmark 2 is not @@ -1648,8 +1683,9 @@ if (ei.perm_algo_len == 0) { LOGP(DMM, LOGL_ERROR, "%s: cannot start ciphering, no intersection " - "between MSC-configured and MS-supported A5 algorithms\n", - vlr_subscr_name(conn->vsub)); + "between MSC-configured and MS-supported A5 algorithms. MSC: %x MS:%s\n", + vlr_subscr_name(conn->vsub), net->a5_encryption_mask, + classmark_a5_name(&conn->vsub->classmark)); return -ENOTSUP; } -- To view, visit https://gerrit.osmocom.org/12404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icb18e0f0bb420de066e7eb8fc683f192ba2a7368 Gerrit-Change-Number: 12404 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181221/d5229bc6/attachment.htm>