Skip to content

Commit cb4ecf7

Browse files
committed
Fixed ICMP hashret() (ticket #170)
1 parent ba9ace9 commit cb4ecf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scapy/layers/inet.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,9 @@ def post_build(self, p, pay):
598598
return p
599599

600600
def hashret(self):
601-
return struct.pack("HH",self.id,self.seq)+self.payload.hashret()
601+
if self.type in [0,8,13,14,15,16,17,18]:
602+
return struct.pack("HH",self.id,self.seq)+self.payload.hashret()
603+
return self.payload.hashret()
602604
def answers(self, other):
603605
if not isinstance(other,ICMP):
604606
return 0

0 commit comments

Comments
 (0)