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.
This commit is contained in:
Cedric Roux
2022-02-04 16:32:49 +01:00
parent 8564ed55ab
commit 92c5115f13
@@ -41,8 +41,11 @@ int decode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeatu
ielen = *(buffer + decoded);
decoded++;
CHECK_LENGTH_DECODER(len - decoded, ielen);
*epsnetworkfeaturesupport = *buffer & 0x1;
decoded++;
/* note: only the bit "IMS voice over PS session in S1 mode" is processed
* TODO: deal with other bits?
*/
*epsnetworkfeaturesupport = (*(buffer + decoded)) & 0x1;
decoded += ielen;
#if defined (NAS_DEBUG)
dump_eps_network_feature_support_xml(epsnetworkfeaturesupport, iei);
#endif