ICMP sockets do not allow multicasting or broadcasting
Creation of the first packetimpact test for ICMP sockets have uncovered a discrepancy with Linux. ICMP sockets on gVisor do not allow sending to multicast or broadcast addresses, whereas this is supported on Linux.
Note: This issue is for sending to multicast/broadcast, not binding to. ICMP sockets on Linux do not support binding to multicast or broadcast addresses.
The packetimpact failures shows we are unable to send to multicast/broadcast when bound:
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=255.255.255.255/bindToDevice=false/expectData=true (0.13s)
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=255.255.255.255/bindToDevice=false/expectData=true/random1k (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=255.255.255.255/bindToDevice=false/expectData=true/empty (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=255.255.255.255/bindToDevice=false/expectData=true/small (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=224.0.0.1/bindToDevice=false/expectData=true (0.12s)
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=224.0.0.1/bindToDevice=false/expectData=true/empty (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=224.0.0.1/bindToDevice=false/expectData=true/small (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
--- FAIL: TestSocket/Send/icmp/bindTo=200.82.82.10/sendTo=224.0.0.1/bindToDevice=false/expectData=true/random1k (0.00s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:460: failed to sendto: network is unreachable
Additionally, when unbound, the destination IPv4 address is not correctly set to multicast/broadcast.
--- FAIL: TestSocket/Send/icmp/unbound/sendTo=255.255.255.255/bindToDevice=true/expectData=true/small (1.02s)
third_party/gvisor/test/packetimpact/tests/udp_send_recv_dgram_test.go:466: got frames:
(Ether matches Ether)
IPv4: DstAddr: 200.82.82.10 255.255.255.255
(ICMPv4 matches ICMPv4)
This issue tracks the implementation of sending to multicast and broadcast addresses with ICMP sockets.
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:196: Remove this case once ICMP sockets allow
Search TODO
A friendly reminder that this issue had no activity for 120 days.