issue
The checksum is not calculated before sendto, and the activation package is discarded when used across network segments in docker.
patch
import array
packet = header + data
words = array.array('h', pakcet)
pkt_checksum = 0
for word in words:
pkt_checksum += (word & 0xffff)
pkt_checksum = (pkt_checksum >> 16) + (pkt_checksum & 0xffff)
pkt_checksum += (pkt_checksum >> 16)
pkt_checksum = (~pkt_checksum) & 0xffff
header = struct.pack("bbHHh", ICMP_ECHO_REQUEST, 0, pkt_checksum, pkt_id, 1)
Insert these codes into line 54 of sendPacket.py
issue
The checksum is not calculated before sendto, and the activation package is discarded when used across network segments in docker.
patch
Insert these codes into line 54 of sendPacket.py