Files
RedBear-OS/netstack
Red Bear OS 67fa431558 netstack: hardcode hop_limit to 64 in IpScheme for smoltcp 0.13.1
smoltcp 0.13.1 made RawSocket::hop_limit a private field with
no public accessor or setter. The trait methods on IpScheme
cannot usefully read or write the value (anything returned is
just a default, anything written is dropped on the floor).

Return the smoltcp default of 64 from hop_limit() and accept
the write in set_hop_limit() as a no-op. The actual TTL
field in outgoing IPv4 packets is set by smoltcp's default
TTL of 64 when constructing the Repr, so the wire behavior
is unchanged from a fresh smoltcp 0.13.1 stack.

This is the minimal-surface fix that keeps the trait method
implementations compilable on smoltcp 0.13.1 without
introducing a per-socket hop_limit cache. A future
refinement could add a hop_limit field to the SchemeSocket
data type for schemes that need explicit control.
2026-07-26 21:30:36 +09:00
..