241 Commits (c5dad67a1628e6d51cf3762832bb62274141b3ea)

Author SHA1 Message Date
Pedro Alvarez 179aeddfa2 Added encryption of security mode command and attach accept again. Attach is working with encryption. 6 years ago
Pedro Alvarez 997c24c099 Added config of cipher_algo and integ_algo initialization in NAS class. 6 years ago
Pedro Alvarez 5eacdd5418 Fixed compilation issues. Attach failing with COTS UE. 6 years ago
Pedro Alvarez 31a25067f5 Merging David Ruprecth's mme_msg_encryption branch into next. Not compiling. 6 years ago
David Rupprecht c480e57721 Config based security algorithm selection 6 years ago
David Rupprecht e547883a8f Wrapper functions for integrity generate 6 years ago
David Rupprecht 7eef2c1c4b start with decryption function 6 years ago
Andre Puschmann 23836a8ab3 Merge branch 'next' into nas_cleanup 6 years ago
Pedro Alvarez 3cddad79cc Adding ability to configure names of TUN interfaces. (#277)
* added config option for tun dev names vs fixed names added config option for M1-U interface addr

* Added options to sgi_mb tun name.

* Added some comments to mbms.conf.example

* Added some comments to example configs to explain the new values.
6 years ago
Pedro Alvarez 35ca9ffd34 Adding TTL option 6 years ago
Pedro Alvarez 3ecacdf3a6 Adding selection of local interface at the MBMS-GW. 6 years ago
Pedro Alvarez 8dc029cc47 Merging next into NAS cleanup. 6 years ago
Andre Puschmann 860d8af911 Merge branch 'master' into next 6 years ago
Zhe Huang 8b526e1c20 Fix SQN incrementation arithmetic (#212)
* Fix SQN incrementation arithmetic

Current implementation of increment_sqn function increments the 48 bits
SQN directly by 1 which is incorrect according to 3GPP TS 33.102 version
11.5.1 Annex C. This bug causes commercial UEs to report AUTHENTICATION
FAILURE EMM cause #21 "synch failure" when SQN is out of sync.

According to 3GPP TS 33.102 version 11.5.1 Annex C, 48 bits SQN consists
of 43 bits SEQ and 5 bits IND parts where SEQ are incremented during
generation of authentication vector or resync procedure. A
new IND value is also assigned when an authentication vector is
generated. However, resync procedure will use the same IND value.

This patch implements the increment_sqn function according to 3GPP TS
33.102 version 11.5.1 Annex C. A new function increment_seq_after_resync
is added to handle the special case of SQN arithmetic during SQN
resynchronization.

This patch is tested with two comercial UEs (Oneplus One and Oneplus 3T).

* Fix the maximum value of SEQ value to be 2^43-1

The SEQ value is 43 bits long and previous maximum value has a typo (one
extra F) which allows SEQ value to be 2^47-1. This patch corrects the typo.
6 years ago
Pedro Alvarez 9350e03810 Changed detach request and tracking area update request to nas.cc 6 years ago
Pedro Alvarez a9e5b3b8e9 Changed service request to nas.cc 6 years ago
Pedro Alvarez 3337f21ffa Added handle GUTI attach from known UE again. 6 years ago
Pedro Alvarez 0d80ae795b Added IMSI attach from unknown UE as a static function. 6 years ago
Pedro Alvarez 860e1b5491 Changing Handling of initial UE NAS messages to use static methods. Handling of unknown GUTI attach request should be ok. 6 years ago
Pedro Alvarez 9e808ff968 Starting to handle NAS initial UE messages as static methods of the nas class. 6 years ago
Pedro Alvarez e3286897ce Changed the rest of the nas handling to use send_downlink_nas_transport. 6 years ago
Pedro Alvarez f1d30c7f23 Changed handle guti_attach_from_known_ue and unknown_ue to use send_downstream_nas_message. 6 years ago
Pedro Alvarez dd725be60c Changed pack identity request. 6 years ago
Pedro Alvarez 65a5139751 Fixed mistake in downlink nas transport. Changing authication request to use downlink_nas_transport. 6 years ago
Pedro Alvarez 21c34b9ce5 Changing security mode complete to use downlink nas transport 6 years ago
Pedro Alvarez 93222f582c Changed authentication response to use downlink_nas_transport(). 6 years ago
Pedro Alvarez 3073ab6822 Changed dettach request to use downlink nas transport. 6 years ago
Pedro Alvarez 749e84315a Starting to add send_downlink_nas_transport helper function. 6 years ago
Pedro Alvarez 872f7adc49 Added find imsi from TMSI helper function. 6 years ago
Pedro Alvarez fa0c8d5995 Moved most of IMSI attach request into nas.cc. 6 years ago
Pedro Alvarez f6b8982939 Moved most of the GUTI attach to nas.cc. 6 years ago
Pedro Alvarez c518d3fde3 Starting to move inital UE messages to nas.cc. Breaking up attach request handling into smaller functions. 6 years ago
Pedro Alvarez 55675eb532 Fixed bug in setting MCC and MNC in attach accept. Attach seems to be working again. 6 years ago
Pedro Alvarez 7c53330bec Fixed NAS initialization. Attach request seems to work again now. 6 years ago
Pedro Alvarez 4ba777c9c3 Added nas log. Fixed gen_auth_info_anwser. Authentication is working again. 6 years ago
Pedro Alvarez de8679b536 Continuing to cleanup. Starting to compile again. 6 years ago
Pedro Alvarez 406d198eac Cleaning up nas.cc 6 years ago
Pedro Alvarez f03967776a Continuing to clean nas.cc 6 years ago
Pedro Alvarez 6ef3124fc9 Fixed up release ue ctx command. 6 years ago
Pedro Alvarez b25c12a084 Fixing nas.cc 6 years ago
Pedro Alvarez 85672d4a3f Fixing up s1ap.cc 6 years ago
Pedro Alvarez d8f1b3c88d Moved uplink nas messages to nas.cc. s1ap_nas_transport is compiling. 6 years ago
Pedro Alvarez 1bad88a432 Changing integrity functions in nas.cc 6 years ago
Pedro Alvarez 5fd337a7ad Continue to move uplink NAS into nas.cc. 6 years ago
Pedro Alvarez 4d40e9ca2d Temporarilly changing ESM state back to previous definition. 6 years ago
Pedro Alvarez c1eff4ce73 Changing pack accept 6 years ago
Pedro Alvarez 3663d59920 Starting to add s1ap_interface_gtpc and s1ap_interface_nas. Adapting send initial context setup request accordingly. 6 years ago
Pedro Alvarez f33fcf65bf Fixing up S1AP context management procedures to use the new class. 6 years ago
Pedro Alvarez 4c164acbc3 Moving many of the functions fron s1ap_nas_transport to it's own NAS class. 6 years ago
Pedro Alvarez 41a5788cc7 Adding nas.h 6 years ago