Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sim/scenarios/drop-rate/drop-rate-error-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class DropRateErrorModel : public ErrorModel {
int rate;
std::mt19937 *rng;
std::uniform_int_distribution<> distr;
int next_rate;
int burst;
int dropped_in_a_row;
int dropped;
Expand Down
10 changes: 5 additions & 5 deletions sim/scenarios/helper/quic-packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ bool QuicPacket::IsVersionNegotiationPacket() {

void QuicPacket::ReassemblePacket() {
// Start with the UDP payload.
Packet new_p = Packet(udp_payload_.data(), udp_payload_.size());
Packet * new_p = new Packet(udp_payload_.data(), udp_payload_.size());
// Add the UDP header and make sure to recalculate the checksum.
udp_hdr_.ForcePayloadSize(udp_payload_.size() + udp_hdr_len_);
udp_hdr_.ForceChecksum(0);
udp_hdr_.InitializeChecksum(ipv4_hdr_.GetSource(), ipv4_hdr_.GetDestination(), ipv4_hdr_.GetProtocol());
new_p.AddHeader(udp_hdr_);
new_p->AddHeader(udp_hdr_);
// Add the IP header, again make sure to recalculate the checksum.
ipv4_hdr_.EnableChecksum();
new_p.AddHeader(ipv4_hdr_);
new_p->AddHeader(ipv4_hdr_);
// Add the PPP header.
new_p.AddHeader(ppp_hdr_);
new_p->AddHeader(ppp_hdr_);
p_->RemoveAtEnd(p_->GetSize());
p_->AddAtEnd(Ptr<Packet>(&new_p));
p_->AddAtEnd(Ptr<Packet>(new_p));
}