]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#553] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Mon, 6 Jul 2020 08:34:48 +0000 (10:34 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 7 Jul 2020 10:48:27 +0000 (12:48 +0200)
src/lib/dhcp/iface_mgr.h
src/lib/dhcp/pkt_filter_inet6.cc

index 04fef66cdbf4834e43fd9c57dfc66ab6ea7908f7..ced67c88a4ed8a7a42121190ab5cbb2bf7681594 100644 (file)
@@ -500,12 +500,6 @@ public:
         >
     > IfaceContainer;
 
-    /// @brief Constructor.
-    IfaceCollection() { }
-
-    /// @brief Destructor.
-    ~IfaceCollection() { }
-
     /// @brief Begin iterator.
     ///
     /// @return The container sequence begin iterator.
@@ -583,6 +577,14 @@ private:
     std::mutex mutex_;
 
     /// @brief The last interface returned by a lookup method.
+    ///
+    /// A lookup method first tries the cache: if it matches the cache is
+    /// returned without an expensive lookup in the container. If it does
+    /// not match and a value is found in the container the cache is
+    /// updated with this value.
+    /// The cache should perform well when active interfaces are a small
+    /// subset of the whole interface set, or when consecutive packets
+    /// come from the same interface.
     IfacePtr cache_;
 
     /// @brief The container.
index 4cdb0e53ba790afa8f76babbdde1b597e0ec6352..9b92bb9b7564d6ea87e9cbf7a6494dca2c4ffe1e 100644 (file)
@@ -95,7 +95,7 @@ PktFilterInet6::openSocket(const Iface& iface,
     if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
                    (char *)&flag, sizeof(flag)) < 0) {
           close(sock);
-          isc_throw(SocketConfigError, "Can't set IPPROTO_IPV6 option on "
+          isc_throw(SocketConfigError, "Can't set IPV6_V6ONLY option on "
                     "IPv6 socket.");
     }
 #endif