gvisor icon indicating copy to clipboard operation
gvisor copied to clipboard

ICMPv6 sockets don't return EINVAL when sending to IPv4 addresses

Open puradox opened this issue 4 years ago • 4 comments

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.

puradox avatar May 10 '21 21:05 puradox

A friendly reminder that this issue had no activity for 120 days.

github-actions[bot] avatar Sep 14 '23 00:09 github-actions[bot]

This issue has been closed due to lack of activity.

github-actions[bot] avatar Dec 13 '23 00:12 github-actions[bot]

There are TODOs still referencing this issue:

  1. test/packetimpact/tests/generic_dgram_socket_send_recv_test.go:422: Remove this if statement once ICMPv6 sockets

Search TODO

github-actions[bot] avatar Dec 14 '23 00:12 github-actions[bot]

A friendly reminder that this issue had no activity for 120 days.

github-actions[bot] avatar Apr 13 '24 00:04 github-actions[bot]