diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/packet_socket.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syscalls/linux/packet_socket.cc b/test/syscalls/linux/packet_socket.cc index 43828a52e..81e607a3f 100644 --- a/test/syscalls/linux/packet_socket.cc +++ b/test/syscalls/linux/packet_socket.cc @@ -214,6 +214,11 @@ TEST_P(PacketSocketTest, RebindProtocol) { ASSERT_NO_FATAL_FAILURE(bind_to_network_protocol(ETH_P_IP)); ASSERT_NO_FATAL_FAILURE(send_udp_message(++counter)); ASSERT_NO_FATAL_FAILURE(test_recv(counter)); + + // A zero valued protocol number should not change the bound network protocol. + ASSERT_NO_FATAL_FAILURE(bind_to_network_protocol(0)); + ASSERT_NO_FATAL_FAILURE(send_udp_message(++counter)); + ASSERT_NO_FATAL_FAILURE(test_recv(counter)); } INSTANTIATE_TEST_SUITE_P(AllPacketSocketTests, PacketSocketTest, |