NAS Token is derived from kasme and NAS ul_count as specified in 3GPP TS
33.401 A.9, and its LSB 16 bits passed to the network when mapping the GUTI to
RAI+PTMSI+PTIMSI_SIG.
Take the chance to move guti2rai_ptmsi() up to before the place it is
used.
Change-Id: I5e6003a2fe3e74cc93cfe4a288e6c114aa288d0b
The previous logic was wrong, since it was increasing the rx_count at
the time where the msg is received and before checking it. Instead, it
should be increased after having validated and accepted it.
This fixes the case where rx_count will have to be reset (to zero) when
doing mobility GERAN->EUTRAN.
Change-Id: I712d95f7784a6a9855fe36300b0ebfcd4c6ef377
Before this patch, the rx_count field was never set to anything other
than zero.
There's still a problem with counter not being incremented when a
S1AP_IntialCtxSetupReq message containing a NAS_PDU is received. This
will be fixed ina follow-up patch.
Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427