Parcourir la source

[2765] Added unit test description in IfaceMgr unit tests.

Marcin Siodelski il y a 11 ans
Parent
commit
68aae7c97b
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/lib/dhcp/tests/iface_mgr_unittest.cc

+ 6 - 0
src/lib/dhcp/tests/iface_mgr_unittest.cc

@@ -1105,6 +1105,12 @@ TEST_F(IfaceMgrTest, setMatchingPacketFilter) {
     EXPECT_TRUE(iface_mgr->isDirectResponseSupported());
 }
 
+// This test checks that it is not possible to open two sockets: IP/UDP
+// and raw (LPF) socket and bind to the same address and port. The
+// raw socket should be opened together with the fallback IP/UDP socket.
+// The fallback socket should fail to open when there is another IP/UDP
+// socket bound to the same address and port. Failing to open the fallback
+// socket should preclude the raw socket from being open.
 TEST_F(IfaceMgrTest, checkPacketFilterLPFSocket) {
     IOAddress loAddr("127.0.0.1");
     int socket1 = -1, socket2 = -1;