google / gvisor

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

packetimpact test udp_recv_mcast_bcast did not work as intended #4896

Closed zeling closed 3 years ago

zeling commented 3 years ago

Description

The test was always using 255.255.255.255 as the subnetBcastAddr unintentionally which makes the test to be a false positive. After creating subnetBcastAddr correctly, the netstack failed.

Steps to reproduce

The result for subtest {bound: subnetBcastAddr, to: net.IPv4bcast}: --- FAIL: TestUDPRecvMcastBcast (0.74s) --- FAIL: TestUDPRecvMcastBcast/bound=211.223.216.255,to=255.255.255.255 (0.20s) third_party/gvisor/test/packetimpact/tests/udp_recv_mcast_bcast_test.go:71: failed to call Recv: rpc error: code = DeadlineExceeded desc = context deadline exceeded FAIL

eth2-dump.pcap.zip

zeling commented 3 years ago

The test is passing now, not sure why though.

zeling commented 3 years ago

One of the subtests ({bound: subnetBcastAddr, to: net.IPv4bcast}) still fails.

tamird commented 3 years ago

The problem seems to be that limited broadcast and multicast is not received by sockets bound to subnet broadcast.

cc @marinaciocea @ghanan94

tamird commented 3 years ago

Update: the test was moved in 6012fe9b5965a2f285f2f99312e6cb7ae84b5fa8 from TestUDPRecvMcastBcast to https://github.com/google/gvisor/blob/df7c82a60c67e9188de752584b981708dd7b94d1/test/packetimpact/tests/udp_send_recv_dgram_test.go#L190-L194