ICMPv6 sockets don't return EINVAL when sending to IPv4 addresses
Description
While writing a PacketImpact test for ICMPv6 sockets, I found a discrepancy with Linux.
When bound to a unicast IPv6 address and sending to an IPv4 address, sendto returns ENETUNREACH whereas Linux returns EINVAL.
When unbound and sending to an IPv4 address, sendto does not return an error whereas Linux returns EINVAL.
Steps to reproduce
Run test //third_party/gvisor/test/packetimpact/tests:generic_dgram_socket_send_recv_test with the if statement linked to this bug removed.
A friendly reminder that this issue had no activity for 120 days.
This issue has been closed due to lack of activity.
There are TODOs still referencing this issue:
- test/packetimpact/tests/generic_dgram_socket_send_recv_test.go:422: Remove this if statement once ICMPv6 sockets
Search TODO
A friendly reminder that this issue had no activity for 120 days.