Closed Jc0x7D3 closed 4 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.69%. Comparing base (
336e7e5
) to head (aba9add
). Report is 30 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
There is an obvious mistake at
src/iface/interface/mod.rs:1204
:total_ip_len
represents the length of the IP packet, whileself.caps.max_transmission_unit
is the max length of link-layer packets. The correct comparison should be with self.caps.ip_mtu().When using Medium Ethernet, since
self.caps.max_transmission_unit
is 14 octets larger thanself.caps.ip_mtu()
, IP packets with length of 1501~1514 octets should be fragmented, but mistakenly entered the non-fragment branch.Additionally, I added a test case sending IPv4 packets of different lengths, which can trigger this error.