On 20/10/2024 09:53, Lars Uffmann wrote:
What I didn't know was whether there was any valid context in which an ipv4-mapped ipv6 address would ever be able to get an ICMP response.
IPv4-mapped addresses (::ffff:0/96) are "namespaced away" from IPv6 by the current IPv6 standards. It is IPv4, for all intents and purposes, you cannot have a valid IPv6 packet with source or destination addresses in the ::ffff:0/96 range.
You might want low-level network diagnostics like "ping" to generate such *invalid* IPv6 packets (that have source addresses or destination addresses in the ::ffff:0/96 range) to check if the network stack correctly drops them, though. You might even need to use a packet sniffer to check if the packet went somewhere, as a reply is extremely unlikely even if it arrived at the destination: no L3 device is supposed to route or reply to such packets.
And obviously invalid IPv6 packets are *not* something ping should send by default without warnings and without explicit requests. A suggestion would be to refuse to send to ::ffff:0/96 if neither -4 or -6 is given, send valid IPv4 if -4 is given (*this* could be the default and not check for -4 on the grounds that it is the expected behavior of ::ffff:0/96, though). On this suggestion, to send invalid IPv6 packets, either -6 or some other explicit CLI option would be required.
-- Henrique de Moraes Holschuh _______________________________________________ busybox mailing list [email protected] https://lists.busybox.net/mailman/listinfo/busybox
