diff options
Diffstat (limited to 'pkg/tcpip/tests')
-rw-r--r-- | pkg/tcpip/tests/integration/multicast_broadcast_test.go | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pkg/tcpip/tests/integration/multicast_broadcast_test.go b/pkg/tcpip/tests/integration/multicast_broadcast_test.go index 4a860a805..d9b2d147a 100644 --- a/pkg/tcpip/tests/integration/multicast_broadcast_test.go +++ b/pkg/tcpip/tests/integration/multicast_broadcast_test.go @@ -31,7 +31,9 @@ import ( const defaultMTU = 1280 -func TestIncomingSubnetBroadcast(t *testing.T) { +// TestIncomingMulticastAndBroadcast tests receiving a packet destined to some +// multicast or broadcast address. +func TestIncomingMulticastAndBroadcast(t *testing.T) { const ( nicID = 1 remotePort = 5555 @@ -179,6 +181,24 @@ func TestIncomingSubnetBroadcast(t *testing.T) { expectRx: true, }, + { + name: "IPv4 all-systems multicast binding to all-systems multicast", + bindAddr: header.IPv4AllSystems, + dstAddr: header.IPv4AllSystems, + expectRx: true, + }, + { + name: "IPv4 all-systems multicast binding to wildcard", + dstAddr: header.IPv4AllSystems, + expectRx: true, + }, + { + name: "IPv4 all-systems multicast binding to unicast", + bindAddr: ipv4Addr.Address, + dstAddr: header.IPv4AllSystems, + expectRx: false, + }, + // IPv6 has no notion of a broadcast. { name: "IPv6 unicast binding to wildcard", |