Skip to content

Commit

Permalink
Tempory fix to prevent crashing until we add a counter to the router …
Browse files Browse the repository at this point in the history
…class for packets generated to increment the PacketID's number
  • Loading branch information
dvw16101 committed Feb 21, 2021
1 parent 69892fb commit 54559c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def filterPackets(self, packetT):
npacket = packet.packet(self.ipAddress, packetT.dstPortNumber,
packetT.srcIP, packetT.srcPortNumber,
"PONG", random.randint(0, 10000),
0, "R", self.packetSize,
0, "R-0", self.packetSize,
self.ipAddress)
self.fileGen.addToLog(npacket.packetID, "Generated at Router",
npacket.sequenceNumber, npacket.ackNumber,
Expand All @@ -158,7 +158,7 @@ def filterPackets(self, packetT):
npacket = packet.packet(self.ipAddress, packetT.dstPortNumber,
packetT.srcIP, packetT.srcPortNumber,
"PONG-RST", random.randint(0, 10000),
0, "R", self.packetSize, self.ipAddress)
0, "R-0", self.packetSize, self.ipAddress)
self.fileGen.addToLog(npacket.packetID, "Generated at Router",
npacket.sequenceNumber, npacket.ackNumber,
npacket.packetType, self.curTime)
Expand Down

0 comments on commit 54559c0

Please sign in to comment.