Closed equation314 closed 1 year ago
It seems to be introduced by https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf which removes ref before mut repr:
ref
mut repr
https://github.com/smoltcp-rs/smoltcp/blob/3a9d017354acde5c139496243dffec4e4fb05fdf/src/iface/interface/mod.rs#L1802-L1808
This causes later changes to repr.payload_len to not change ip_repr.payload_len, which is used as the total length in the IP header in emit_ip:
repr.payload_len
ip_repr.payload_len
emit_ip
https://github.com/smoltcp-rs/smoltcp/blob/3a9d017354acde5c139496243dffec4e4fb05fdf/src/iface/interface/mod.rs#L1842-L1848
Before https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf (https://github.com/smoltcp-rs/smoltcp/commit/98deb41ee531498c7117d87b34b28b18c63366c4):
After https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf:
It seems to be introduced by https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf which removes
ref
beforemut repr
:https://github.com/smoltcp-rs/smoltcp/blob/3a9d017354acde5c139496243dffec4e4fb05fdf/src/iface/interface/mod.rs#L1802-L1808
This causes later changes to
repr.payload_len
to not changeip_repr.payload_len
, which is used as the total length in the IP header inemit_ip
:https://github.com/smoltcp-rs/smoltcp/blob/3a9d017354acde5c139496243dffec4e4fb05fdf/src/iface/interface/mod.rs#L1842-L1848
Before https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf (https://github.com/smoltcp-rs/smoltcp/commit/98deb41ee531498c7117d87b34b28b18c63366c4):
After https://github.com/smoltcp-rs/smoltcp/commit/3a9d017354acde5c139496243dffec4e4fb05fdf: