]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3230] addressed review
authorRazvan Becheriu <razvan@isc.org>
Fri, 16 Feb 2024 16:30:14 +0000 (18:30 +0200)
committerRazvan Becheriu <razvan@isc.org>
Fri, 16 Feb 2024 16:30:14 +0000 (18:30 +0200)
src/lib/dhcp/pkt_filter_inet.cc
src/lib/dhcp/pkt_filter_inet6.cc
src/lib/dhcp/pkt_filter_lpf.cc
src/lib/dhcp/tests/pkt_filter6_test_utils.h
src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
src/lib/dhcp/tests/pkt_filter_test_utils.h
src/lib/dhcp/testutils/pkt_filter_test_stub.cc

index 6f46e2ea03e160e49a01b4a8c95e79f00982a989..5972a4de58167db24042065b06ad1420bfd9308f 100644 (file)
@@ -22,11 +22,11 @@ const size_t PktFilterInet::CONTROL_BUF_LEN = 512;
 bool
 PktFilterInet::isSocketReceivedTimeSupported() const {
 #ifdef SO_TIMESTAMP
-        return (true);
+    return (true);
 #else
-        return (false);
+    return (false);
 #endif
-} 
+}
 
 SocketInfo
 PktFilterInet::openSocket(Iface& iface,
index 917e9b6382d9fe0690396aade5c9ed859a08dbec..98ea732c29804f56ae10c0907ebbb90bff404486 100644 (file)
@@ -25,9 +25,9 @@ const size_t PktFilterInet6::CONTROL_BUF_LEN = 512;
 bool
 PktFilterInet6::isSocketReceivedTimeSupported() const {
 #ifdef SO_TIMESTAMP
-        return (true);
+    return (true);
 #else
-        return (false);
+    return (false);
 #endif
 }
 
index 82160f1317a802982702531684041e6b20cb6d10..f0f19e946ab6ccb6db2333ea5c174fe2f3104e1f 100644 (file)
@@ -131,9 +131,9 @@ namespace dhcp {
 bool
 PktFilterLPF::isSocketReceivedTimeSupported() const {
 #ifdef SO_TIMESTAMP
-        return (true);
+    return (true);
 #else
-        return (false);
+    return (false);
 #endif
 }
 
index a2e06205e8f09a36e62f59398c72c8fbe4083804..a4437f768902011af7259a14490271d2c2660df2 100644 (file)
@@ -76,8 +76,8 @@ public:
     /// @brief Checks that a received message has the appropriate events
     /// in it's event stack.
     ///
-    /// @param rcvd_msg An instance of the message to be tested.
-    /// @param so_time_supported If true the event stack should have with
+    /// @param msg An instance of the message to be tested.
+    /// @param so_time_supported If true the event stack should have
     /// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false
     /// it should have only the latter.
     void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const;
index 83edf9ace42daa3fd65cabdcb9abf223da51c5d6..05c683396d2432bb96fd02a69e2ab10e802cd66f 100644 (file)
@@ -205,7 +205,7 @@ TEST_F(PktFilterBPFTest, receive) {
     testRcvdMessageAddressPort(rcvd_pkt);
 
     // Verify that the packet event stack is as expected.
-    testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
+    testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
 }
 
 // This test verifies that if the packet is received over the raw
index 62636c178dc60e23d59b0cddb6910709fe11d178..9688c5cfc16c959fed3824255d78199f127a5c4e 100644 (file)
@@ -145,7 +145,7 @@ TEST_F(PktFilterInet6Test, receive) {
     testRcvdMessage(rcvd_pkt);
 
     // Verify that the packet event stack is as expected.
-    testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
+    testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
 }
 
 } // anonymous namespace
index f9dbc66cd8295b0784aa911dba07b04360b287c6..a83f5431cdbf7c98bebbb13373df7823f5c18832 100644 (file)
@@ -160,7 +160,7 @@ TEST_F(PktFilterInetTest, receive) {
     testRcvdMessageAddressPort(rcvd_pkt);
 
     // Verify that the packet event stack is as expected.
-    testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
+    testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
 }
 
 } // anonymous namespace
index 56d6f72297fd988c10a08ead6ef182f8bda65894..f5952c0e77c8d304eadadc2687eceb681916d943 100644 (file)
@@ -196,7 +196,7 @@ TEST_F(PktFilterLPFTest, receive) {
     testRcvdMessageAddressPort(rcvd_pkt);
 
     // Verify that the packet event stack is as expected.
-    testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
+    testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
 }
 
 // This test verifies that if the packet is received over the raw
index ef7574e6b4ae1ad86abca59014f2c31e41cbfba2..ed2300ba62341d1dd462535998b786d5150c2b51 100644 (file)
@@ -85,8 +85,8 @@ public:
     /// @brief Checks that a received message has the appropriate events
     /// in it's event stack.
     ///
-    /// @param rcvd_msg An instance of the message to be tested.
-    /// @param so_time_supported If true the event stack should have with
+    /// @param msg An instance of the message to be tested.
+    /// @param so_time_supported If true the event stack should have
     /// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false
     /// it should have only the latter.
     void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const;
index 2cc511e2403d5856de4d850761dd9f2852a4df30..ae64370e0d21659a56a6d0be50fa2575e2ceef1b 100644 (file)
@@ -27,9 +27,9 @@ PktFilterTestStub::isDirectResponseSupported() const {
 bool
 PktFilterTestStub::isSocketReceivedTimeSupported() const {
 #ifdef SO_TIMESTAMP
-    return(true);
+    return (true);
 #else
-    return(false);
+    return (false);
 #endif
 }