[MERGED] openbsc[master]: VTY: Print 3G auth tuples, not just 2G auth tuples

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.org
Mon Feb 6 14:09:04 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: VTY: Print 3G auth tuples, not just 2G auth tuples
......................................................................


VTY: Print 3G auth tuples, not just 2G auth tuples

Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b
Related: OS#1592
---
M openbsc/src/gprs/sgsn_vty.c
1 file changed, 24 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Holger Freyther: Looks good to me, approved



diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index 4a97687..246867d 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -1,5 +1,5 @@
 /*
- * (C) 2010-2013 by Harald Welte <laforge at gnumonks.org>
+ * (C) 2010-2016 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010 by On-Waves
  * (C) 2015 by Holger Hans Peter Freyther
  * All Rights Reserved
@@ -696,15 +696,30 @@
 
 		vty_out(vty, "    A3A8 tuple (used %d times): ",
 			at->use_count);
-		vty_out(vty, "     seq # : %d, ",
+		vty_out(vty, "     CKSN: %d, ",
 			at->key_seq);
-		vty_out(vty, "     RAND  : %s, ",
-			osmo_hexdump(at->vec.rand, sizeof(at->vec.rand)));
-		vty_out(vty, "     SRES  : %s, ",
-			osmo_hexdump(at->vec.sres, sizeof(at->vec.sres)));
-		vty_out(vty, "     Kc    : %s%s",
-			osmo_hexdump(at->vec.kc, sizeof(at->vec.kc)),
-			VTY_NEWLINE);
+		if (at->vec.auth_types & OSMO_AUTH_TYPE_GSM) {
+			vty_out(vty, "RAND: %s, ",
+				osmo_hexdump(at->vec.rand,
+					     sizeof(at->vec.rand)));
+			vty_out(vty, "SRES: %s, ",
+				osmo_hexdump(at->vec.sres,
+					     sizeof(at->vec.sres)));
+			vty_out(vty, "Kc: %s%s",
+				osmo_hexdump(at->vec.kc,
+					     sizeof(at->vec.kc)), VTY_NEWLINE);
+		}
+		if (at->vec.auth_types & OSMO_AUTH_TYPE_UMTS) {
+			vty_out(vty, "     AUTN: %s, ",
+				osmo_hexdump(at->vec.autn,
+					     sizeof(at->vec.autn)));
+			vty_out(vty, "RES: %s, ",
+				osmo_hexdump(at->vec.res, at->vec.res_len));
+			vty_out(vty, "IK: %s, ",
+				osmo_hexdump(at->vec.ik, sizeof(at->vec.ik)));
+			vty_out(vty, "CK: %s, ",
+				osmo_hexdump(at->vec.ck, sizeof(at->vec.ck)));
+		}
 	}
 
 	llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list