Commit Graph

492 Commits

Author SHA1 Message Date
Andre Puschmann 23836a8ab3 Merge branch 'next' into nas_cleanup 2018-10-22 11:26:00 +02:00
Andre Puschmann 15d439761a log build info in eNB/EPC logs 2018-10-05 14:58:09 +02:00
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.
2018-10-05 11:12:31 +02:00
Pedro Alvarez 35ca9ffd34 Adding TTL option 2018-10-04 14:44:26 +02:00
Pedro Alvarez 3ecacdf3a6 Adding selection of local interface at the MBMS-GW. 2018-10-04 14:44:26 +02:00
Pedro Alvarez d443604661 Merge next into gtp_cleanup_sn. Fixed some conflicts. 2018-10-04 12:09:13 +01:00
Andre Puschmann 0deda67930 print build-info during epc startup 2018-10-01 21:44:16 +02:00
Pedro Alvarez c1f633c5c7 Dropping bitfields for now. Using #defines and uint8_t for the flags. 2018-10-01 15:17:26 +01:00
Pedro Alvarez e320c33aef Fixed last compilation issues. 2018-09-28 15:42:28 +01:00
Pedro Alvarez ee04639337 Changed gtpu header flags to use a bitfield. Fixing compilation issues. 2018-09-28 13:46:13 +01:00
Pedro Alvarez 8072aaa091 Fixed minor mistake in resolving conflict. 2018-09-25 19:11:56 +01:00
Pedro Alvarez 8dc029cc47 Merging next into NAS cleanup. 2018-09-25 18:56:03 +01:00
Andre Puschmann b27ff06e79 Merge remote-tracking branch 'origin/issue_178' into next 2018-09-25 15:10:38 +02:00
Pedro Alvarez b4f9fb06dd Changing EPC to use uint32_to_uint8 function 2018-09-25 12:09:18 +01:00
Andre Puschmann 860d8af911 Merge branch 'master' into next 2018-09-24 15:50:10 +02:00
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.
2018-09-24 11:28:07 +02:00
Andre Puschmann a9d46cbad3 Merge branch 'master' into next_test_after_merge 2018-09-20 13:01:43 +02:00
Zhe Huang cd1fb0d81e Set AMF to all zeros during resync (#213)
During the resync procedure, the security_milenage_f1_star generates a
MAC_S value that does not match the MAC_S value reported in AUTS. This
posts a security risk.

According to 3GPP TS 33.102 version 11.5.1 section 6.3.3, the AMF used
to calculate MAC-S assumes a dummy value of all zeros so that it does
not need to be transmitted in the clear in the re-synch message.

This patch corrects this problem. MAC_S reported by AUTS matches the
MAC_S calculated using f1_star function after the fix.
2018-09-20 12:57:47 +02:00
Pedro Alvarez 7bad5a52a0 Merging handling of initial UE messages as static methods into nas cleanup. 2018-08-29 18:44:18 +01:00
Pedro Alvarez 9350e03810 Changed detach request and tracking area update request to nas.cc 2018-08-29 17:47:34 +01:00
Pedro Alvarez d2cb01ce87 Deleted old service request. 2018-08-29 14:56:55 +01:00
Pedro Alvarez a9e5b3b8e9 Changed service request to nas.cc 2018-08-29 14:52:09 +01:00
Pedro Alvarez 4313fb1e72 Making sure M-TMSI is in host order in other small bug fixes. 2018-08-28 17:28:31 +01:00
Pedro Alvarez 3337f21ffa Added handle GUTI attach from known UE again. 2018-08-28 15:29:26 +01:00
Pedro Alvarez 0d80ae795b Added IMSI attach from unknown UE as a static function. 2018-08-27 19:17:23 +01:00
Pedro Alvarez 0ddb3d39dc Moved handle_imsi_attach_request_from_unknown_ue to nas.cc in static method. Working. 2018-08-27 18:13:42 +01:00
Pedro Alvarez 860e1b5491 Changing Handling of initial UE NAS messages to use static methods. Handling of unknown GUTI attach request should be ok. 2018-08-27 16:06:18 +01:00
Pedro Alvarez 9e808ff968 Starting to handle NAS initial UE messages as static methods of the nas class. 2018-08-24 18:15:06 +01:00
Pedro Alvarez c011df5612 Changing Service request to nas.cc 2018-08-23 14:15:12 +01:00
Pedro Alvarez a46f1e4e9a Changing Tracking Area Update Request Initial Message to nas.cc 2018-08-23 12:19:17 +01:00
Pedro Alvarez e3286897ce Changed the rest of the nas handling to use send_downlink_nas_transport. 2018-08-22 16:59:40 +01:00
Pedro Alvarez f1d30c7f23 Changed handle guti_attach_from_known_ue and unknown_ue to use send_downstream_nas_message. 2018-08-22 15:00:01 +01:00
Pedro Alvarez dd725be60c Changed pack identity request. 2018-08-21 18:29:28 +01:00
Pedro Alvarez 65a5139751 Fixed mistake in downlink nas transport. Changing authication request to use downlink_nas_transport. 2018-08-21 17:51:00 +01:00
Pedro Alvarez 21c34b9ce5 Changing security mode complete to use downlink nas transport 2018-08-21 16:05:08 +01:00
Pedro Alvarez 93222f582c Changed authentication response to use downlink_nas_transport(). 2018-08-21 15:17:08 +01:00
Pedro Alvarez 3073ab6822 Changed dettach request to use downlink nas transport. 2018-08-21 14:11:28 +01:00
Pedro Alvarez 749e84315a Starting to add send_downlink_nas_transport helper function. 2018-08-21 12:57:23 +01:00
Pedro Alvarez 8bcc8ecaeb Starting to move initial attach request handling to nas.cc 2018-08-20 19:47:21 +01:00
Pedro Alvarez 872f7adc49 Added find imsi from TMSI helper function. 2018-08-20 17:59:50 +01:00
Pedro Alvarez fa0c8d5995 Moved most of IMSI attach request into nas.cc. 2018-08-20 16:48:16 +01:00
Pedro Alvarez f6b8982939 Moved most of the GUTI attach to nas.cc. 2018-08-20 15:48:23 +01:00
Pedro Alvarez c518d3fde3 Starting to move inital UE messages to nas.cc. Breaking up attach request handling into smaller functions. 2018-08-16 17:45:39 +01:00
Pedro Alvarez 1f2e22adf4 coding style fixup. 2018-08-16 12:48:37 +01:00
Pedro Alvarez 23bd95c432 Whitespace fix. 2018-08-15 18:38:06 +01:00
Pedro Alvarez 55675eb532 Fixed bug in setting MCC and MNC in attach accept. Attach seems to be working again. 2018-08-15 18:13:36 +01:00
Pedro Alvarez 1fba7f0afa Moved function that gets NAS type string to liblte_mme.cc 2018-08-14 18:42:48 +01:00
Pedro Alvarez 127e214b07 Added function to print string of NAS message type based on the message code. 2018-08-14 17:19:19 +01:00
Pedro Alvarez 5d75b16ee9 Fixed up mistake in UE Context Release command. 2018-08-14 15:38:25 +01:00
Pedro Alvarez 7c53330bec Fixed NAS initialization. Attach request seems to work again now. 2018-08-14 13:59:05 +01:00