Change in osmo-msc[master]: Fix enabling of UMTS UEA encryption

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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Nov 5 09:48:27 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/22757 )

Change subject: Fix enabling of UMTS UEA encryption
......................................................................

Fix enabling of UMTS UEA encryption

The existing code allowed the user to configure UMTS encryption in the
vty, but we never actually passed this information down to RANAP.  As a
result, the RAN had no chance of ever enabling encryption on the air
interface.

Change-Id: Ieaaa6b23b7337b7edb902fad8031e195e0c5e9d2
Related: OS#4144
---
M include/osmocom/msc/ran_msg.h
M src/libmsc/msc_a.c
M src/libmsc/ran_msg_iu.c
3 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve



diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h
index fd2439f..816ef1f 100644
--- a/include/osmocom/msc/ran_msg.h
+++ b/include/osmocom/msc/ran_msg.h
@@ -102,6 +102,9 @@
 		/* out-argument to return the key to the caller, pass NULL if not needed. */
 		struct geran_encr *chosen_key;
 	} geran;
+	struct {
+		bool uea_encryption;
+	} utran;
 };
 
 struct ran_handover_request {
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 9b6b602..fe3af14 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -348,6 +348,9 @@
 				/* for ran_a.c to store the GERAN key that is actually used */
 				.chosen_key = &msc_a->geran_encr,
 			},
+			.utran = {
+				.uea_encryption = net->uea_encryption
+			}
 		},
 	};
 
diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c
index 5d13460..6120918 100644
--- a/src/libmsc/ran_msg_iu.c
+++ b/src/libmsc/ran_msg_iu.c
@@ -369,7 +369,7 @@
 
 	LOG_RAN_IU_ENC(caller_fi, LOGL_DEBUG, "Tx RANAP SECURITY MODE COMMAND to RNC, ik %s\n",
 			osmo_hexdump_nospc(cm->vec->ik, 16));
-	return ranap_new_msg_sec_mod_cmd(cm->vec->ik, NULL, RANAP_KeyStatus_new);
+	return ranap_new_msg_sec_mod_cmd(cm->vec->ik, cm->utran.uea_encryption ? cm->vec->ck : NULL, RANAP_KeyStatus_new);
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/22757
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ieaaa6b23b7337b7edb902fad8031e195e0c5e9d2
Gerrit-Change-Number: 22757
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Assignee: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211105/fb952d7f/attachment.htm>


More information about the gerrit-log mailing list