You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ip: Replace as u8 casts with explicit From conversions for IpProtocol
According to the IANA protocol number specification
(https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml),
protocol numbers are always within the u8 range.
Using `as` for type conversion is dangerous because it can silently
discard higher-order data, leading to bugs that are hard to detect.
This change ensures all protocol number conversions are type-safe and
explicit, avoiding accidental data loss and aligning the code with the
protocol specification.
0 commit comments