Bug 2161

Summary: Error in removing a bearer in epc-mme class
Product: ns-3 Reporter: Michele Polese <michele.polese>
Component: lteAssignee: Biljana Bojović <bbojovic>
Status: NEW ---    
Severity: minor CC: bbojovic, ns-bugs
Priority: P5    
Version: ns-3.23   
Hardware: Mac Intel   
OS: Linux   

Description Michele Polese 2015-07-22 13:46:55 UTC
In the method void EpcMme::RemoveBearer (Ptr<UeInfo> ueInfo, uint8_t epsBearerId)
when the given epsBearerId is removed from the list of bearers obtained from ueInfo the number of bearers bearerCounter is not decreased. 
Therefore if a bearer is removed during the simulation with the method DoSendReleaseDataRadioBearer(imsi, rnti, bearerId) from LteEnbRrc class (actually invoked by a stub method which cycles on all the bearers and makes a call of the method for each bearerId) and then another one is added (for example by scheduling the execution of the classic instructions to add a bearer) then 

void
UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
fails with the assert
assert failed. cond="bearerId == 0 || bid == bearerId", msg="bearer ID mismatch (1 != 2, the assumption that ID are allocated in the same way by MME and RRC is not valid any more", file=../src/lte/model/lte-enb-rrc.cc, line=345

since the MME thinks that there is already one bearer.