Ticket #397 (closed defect: fixed)
UDP checksum calculated incorrectly
| Reported by: | kosma | Owned by: | kosma |
|---|---|---|---|
| Priority: | high | Milestone: | UMPA 0.3 - L2 |
| Component: | UMPA | Version: | current svn |
| Keywords: | Cc: |
Description (last modified by getxsick) (diff)
The following sample program generates incorrect UDP checksum.
import umit.umpa
import umit.umpa.protocols
ethernet = umit.umpa.protocols.Ethernet(
src="00:11:09:81:ec:dc",
dst="00:1e:e5:6d:7b:42",
)
ip = umit.umpa.protocols.IP(
src="192.168.1.234",
dst="156.17.70.157",
)
udp = umit.umpa.protocols.UDP(
srcport=1234,
dstport=1234,
)
payload = umit.umpa.protocols.Payload(
data="UMPAPA\n"
)
packet = umit.umpa.Packet(ethernet, ip, udp, payload)
socket = umit.umpa.SocketL2()
socket.send(packet)
Wireshark complains about:
User Datagram Protocol, Src Port: 1234 (1234), Dst Port: 1234 (1234) (...) Checksum: 0x5129 [incorrect, should be 0x50f2 (maybe caused by "UDP checksum offload"?)]
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
