SocketAddrV6 is not roundtrip serializable
6 months ago
- #IPv6
- #Rust
- #Serialization
- Encountered a bug with JSON serialization due to complex map keys.
- Used property-based testing with proptest to generate random instances for testing.
- Discovered SocketAddrV6 is not roundtrip serializable due to the flowinfo field.
- Investigated the flowinfo field in SocketAddrV6, finding it's a combination of Flow Label and Traffic Class fields from IPv6.
- Explored the scope_id field in SocketAddrV6, used for disambiguating network interfaces in link-local addressing.
- Concluded that SocketAddrV6's design violates the principle of least surprise by not having a lossless textual representation.