Error with GtpUserX2
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- networking
Direzione di ricerca
Start with src/corenetwork/gtp/GtpUserX2.cc at the referenced insertion point and inspect the length handling in src/corenetwork/gtp/GtpUserMsgSerializer.cc. Compare the existing GTP serializers with the proposed X2HandoverDataMsg serializer, then reproduce the UDP emulation with two GNBs. Done means the setup no longer reports length errors or a missing X2HandoverDataMsg serializer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In an emulation setup, sending UDP packets, with 2 GNBs, errors occur at the GtpUserMsgSerializer due to not setting the GtpUserMsg length here since it reads the default length of 1B and remainder become <0 here.
I have fixed it by setting gtpMsg->setChunkLenght(B(8)) before inserting and now it seems to work.
In addition, in this setting, errors also occur because there is no X2HandoverDataMsg serializer. I have added a X2HandoverDataMsgSerializer class as below and it fixes it.
using namespace inet;
Register_Serializer(X2HandoverDataMsg, X2HandoverDataMsgSerializer);
void X2HandoverDataMsgSerializer::serialize(inet::MemoryOutputStream &stream,
const inet::Ptr<const inet::Chunk> &chunk) const {
auto startPosition = stream.getLength();
const auto& x2DataMsg = staticPtrCast<const X2HandoverDataMsg>(chunk);
//We need to write to the stream exactly getChunkLength(), which is 11 for ltex2messages. If we write only 8, then fill with remainders
//We cannot write the length because we write 12 bytes and cannot change the ltex2message length
stream.writeUint24Be(B(x2DataMsg->getChunkLength()).get());
stream.writeUint32Be(x2DataMsg->getDestinationId());
stream.writeUint32Be(x2DataMsg->getSourceId());
int64_t remainders = B(x2DataMsg->getChunkLength() - (stream.getLength() - startPosition)).get();
if (remainders < 0) {
throw cRuntimeError("X2HandoverDataMsgSerializer length = %d smaller than required %d bytes", (int)B(x2DataMsg->getChunkLength()).get(), (int)B(stream.getLength() - startPosition).get());
} else {
stream.writeByteRepeatedly('?', remainders);
}
}
const inet::Ptr<inet::Chunk> X2HandoverDataMsgSerializer::deserialize(
inet::MemoryInputStream &stream) const {
auto startPosition = stream.getPosition();
auto x2DataMsg = makeShared<X2HandoverDataMsg>();
B dataLength = B(stream.readUint24Be());
x2DataMsg->setDestinationId(stream.readUint32Be());
x2DataMsg->setSourceId(stream.readUint32Be());
B remainders = dataLength - (stream.getPosition() - startPosition);
ASSERT(remainders >= B(0));
if (remainders.get()>=0) {
stream.readByteRepeatedly('?', B(remainders).get());
}
return x2DataMsg;
}
- Lingua principale
- C++
- Stelle
- 240
- Fork
- 123
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Unipisa/Simu5G
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
-
bearer configuration errorAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di Unipisa/Simu5G
Issue simili
-
MingW: build errorApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
seladb/PcapPlusPlus#2412 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Windows hosted engine host checks --ardia-background but not --background on startup refusal dialogApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ardia-browser/ardia#6129 ·
I maintainer di solito rispondono entro 1 giorno
-
area:infra kind:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rpm-software-management/dnf5#3082 ·
I maintainer di solito rispondono entro 2 giorni