Commit 92c5115f authored by Cedric Roux's avatar Cedric Roux

lte: fixes in EpsNetworkFeatureSupport.c

We have to eat all the bytes, not only one.
We have to get the bit we want from the right buffer position.

Note: only one bit is supported from this "EPS network feature support",
not sure how to properly deal with it, so let's keep the code as it is.

This commit was made because the MAGMA MME sends "EPS network feature
support" to the UE in the NAS message "Attach Accept". OAI MME does not
send this. So the bug about size was not seen.
parent 8564ed55
...@@ -41,8 +41,11 @@ int decode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeatu ...@@ -41,8 +41,11 @@ int decode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeatu
ielen = *(buffer + decoded); ielen = *(buffer + decoded);
decoded++; decoded++;
CHECK_LENGTH_DECODER(len - decoded, ielen); CHECK_LENGTH_DECODER(len - decoded, ielen);
*epsnetworkfeaturesupport = *buffer & 0x1; /* note: only the bit "IMS voice over PS session in S1 mode" is processed
decoded++; * TODO: deal with other bits?
*/
*epsnetworkfeaturesupport = (*(buffer + decoded)) & 0x1;
decoded += ielen;
#if defined (NAS_DEBUG) #if defined (NAS_DEBUG)
dump_eps_network_feature_support_xml(epsnetworkfeaturesupport, iei); dump_eps_network_feature_support_xml(epsnetworkfeaturesupport, iei);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment