google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.38k stars 1.27k forks source link

Binding to IPv6 multicast from ICMPv6 sockets returns EADDRNOTAVAIL #5960

Open puradox opened 3 years ago

puradox commented 3 years ago

Description

While writing a PacketImpact test for ICMP sockets, I found a discrepancy with Linux.

When binding to the following IPv6 multicast addresses,

Linux returns the EINVAL error code, but gVisor returns the EADDRNOTAVAIL error code.

Steps to reproduce

  1. Run test //third_party/gvisor/test/packetimpact/tests:icmp_bind_native_test
  2. Observe success from native Linux
  3. Run test //third_party/gvisor/test/packetimpact/tests:icmp_bind_netstack_test
  4. Observe the following failures from gVisor:
--- FAIL: TestICMPSocketBind/IPv6MulticastInterfaceLocalAllNodes (0.00s)
    third_party/gvisor/test/packetimpact/tests/icmp_bind_test.go:127: got dut.BindWithErrno(_, _, 9, ff01::1) = (_, cannot assign requested address), want (_, invalid argument)
--- FAIL: TestICMPSocketBind/IPv6MulticastLinkLocalAllRouters (0.00s)
    third_party/gvisor/test/packetimpact/tests/icmp_bind_test.go:127: got dut.BindWithErrno(_, _, 10, ff02::2) = (_, cannot assign requested address), want (_, invalid argument)
--- FAIL: TestICMPSocketBind/IPv6MulticastLinkLocalAllNodes (0.00s)
    third_party/gvisor/test/packetimpact/tests/icmp_bind_test.go:127: got dut.BindWithErrno(_, _, 13, ff02::1) = (_, cannot assign requested address), want (_, invalid argument)
github-actions[bot] commented 10 months ago

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