Another day, another reason ipv6 should have been ipv4 with more bits.
SocketAddrV6 is not roundtrip serializable
11–16 of 16 posts
Re: SocketAddrV6 is not roundtrip serializable
#12Re: SocketAddrV6 is not roundtrip serializable
#13I think the answer is very obvious here: Debug should not omit fields. serde should not skip fields. Which means that there needs to be a way to put flowinfo into textual representation. Since there are already incompatibilities in how ipv6 addresses are handled ("%enp4s0f0" is supported by ping but not by Rust), might as well make something up, like "1234::5678%9-Q0x42". Tools like "ping" accept "-Q 0x42" option alr…
Re: SocketAddrV6 is not roundtrip serializable
#14That reliance on layer 4 data means it is challenging to deploy a new transport protocol (such as SCTP) that even just crosses these networks; in fact, the trend these days for protocol design is to encrypt everything, even data that is not particularly sensitive (cf QUIC, on which HTTP/3 is based), in order to avoid such middleboxes growing dependent on data they should never have been able to read, and thus avoid the resultant fossilisation of the Internet protocols.
But this case of wireless networks shows there can be some justification to the routing part of the network treating different flows differently, if only on an opt-in basis, and IPv6 flowinfo is probably the best mechanism for such categorization/tagging where the sender does not request a particular level of services but does mark its data as being in a particular category, probably a dynamic one. Unfortunately, it is unlikely to be meaningfully used as long as IPv4 remains in wide use: until this changes, these networks will need a solution that works for IPv4 (which has ToS but no flowinfo, and too few ToS bits for it to be used for dynamic flow categorization, even after a redefinition -- fun fact: the IPv4 ToS field supplanted a previous definition for that field, then known as DiffServ), and the path of least resistance means they will just apply that solution for IPv6 as well.
Re: SocketAddrV6 is not roundtrip serializable
#15Earlier quoted context omitted.
You can use ::ffff:127.0.0.2 for most purposes, but you can't ping it.
> you can't ping it WTF?.. (My Linux machine can, but I’ve no clue if I should trust that now.)
Re: SocketAddrV6 is not roundtrip serializable
#16Earlier quoted context omitted.
> you can't ping it WTF?.. (My Linux machine can, but I’ve no clue if I should trust that now.)
Doesn't work on my Arch Linux. Neither does pinging ::ffff:127.0.0.1. Pinging 127.0.0.1 and ::1 works.
$ ping ::ffff:127.0.0.1
PING ::ffff:127.0.0.1 (::ffff:127.0.0.1) 56 data bytes
says the non-working one, $ ping ::ffff:127.0.0.1
PING ::ffff:127.0.0.1 (127.0.0.1): 56 data bytes
says the working one. In Wireshark, the latter appears as ICMPv4 packets on the lo interface, whereas the former does not appear at all(?..). So overall this makes some amount of sense: you can write a TCP-using program that's agnostic to whether it's running on top IPv4 or IPv6, but you have to use different ICMP versions for IPv4 and IPv6. I actually don't know why it has to be that way.(My initial confusion was because I thought 'o11c was saying they could ping ::ffff:127.0.0.1 but not .2. It makes much more sense for either both or neither to be pingable.)
[1] https://github.com/iputils/iputils (the one that comes with the bizarre tracepath thing)