Skip to content

Commit

Permalink
packet loss header cast
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar-costa committed Aug 5, 2021
1 parent 1f3570f commit 58802a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def recv_msg_cpu(self, pkt):
switch_name = interface.split("-")[0]
packet = Ether(str(pkt))
if packet.type == 0x1234:
loss_header = LossHeader(packet.payload)
loss_header = LossHeader(bytes(packet.payload))
batch_id = loss_header.batch_id >> 7
print switch_name, batch_id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def recv_msg_cpu(self, pkt):
switch_name = interface.split("-")[0]
packet = Ether(str(pkt))
if packet.type == 0x1234:
loss_header = LossHeader(packet.payload)
loss_header = LossHeader(bytes(packet.payload))
batch_id = loss_header.batch_id >> 7
print switch_name, batch_id
self.check_sw_links(switch_name, batch_id)
Expand Down

0 comments on commit 58802a4

Please sign in to comment.