Parcourir la source

[3295] Removed unused function which included Client FQDN option.

Marcin Siodelski il y a 11 ans
Parent
commit
02a70f5541
2 fichiers modifiés avec 1 ajouts et 58 suppressions
  1. 1 42
      src/bin/dhcp6/dhcp6_srv.cc
  2. 0 16
      src/bin/dhcp6/dhcp6_srv.h

+ 1 - 42
src/bin/dhcp6/dhcp6_srv.cc

@@ -1045,44 +1045,6 @@ Dhcpv6Srv::processClientFqdn(const Pkt6Ptr& question, const Pkt6Ptr& answer) {
     return (fqdn_resp);
 }
 
-
-void
-Dhcpv6Srv::appendClientFqdn(const Pkt6Ptr& question,
-                            Pkt6Ptr& answer,
-                            const Option6ClientFqdnPtr& fqdn) {
-
-    // If FQDN is NULL, it means that client did not request DNS Update, plus
-    // server doesn't force updates.
-    if (!fqdn) {
-        return;
-    }
-
-    // Server sends back the FQDN option to the client if client has requested
-    // it using Option Request Option. However, server may be configured to
-    // send the FQDN option in its response, regardless whether client requested
-    // it or not.
-    bool include_fqdn = FQDN_ALWAYS_INCLUDE;
-    if (!include_fqdn) {
-        OptionUint16ArrayPtr oro = boost::dynamic_pointer_cast<
-            OptionUint16Array>(question->getOption(D6O_ORO));
-        if (oro) {
-            const std::vector<uint16_t>& values = oro->getValues();
-            for (int i = 0; i < values.size(); ++i) {
-                if (values[i] == D6O_CLIENT_FQDN) {
-                    include_fqdn = true;
-                }
-            }
-        }
-    }
-
-    if (include_fqdn) {
-        LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL,
-                  DHCP6_DDNS_SEND_FQDN).arg(fqdn->toText());
-        answer->addOption(fqdn);
-    }
-
-}
-
 void
 Dhcpv6Srv::createNameChangeRequests(const Pkt6Ptr& answer,
                                     const Option6ClientFqdnPtr& opt_fqdn) {
@@ -2179,7 +2141,6 @@ Dhcpv6Srv::processSolicit(const Pkt6Ptr& solicit) {
 
     Option6ClientFqdnPtr fqdn = processClientFqdn(solicit, advertise);
     assignLeases(solicit, advertise);
-    appendClientFqdn(solicit, advertise, fqdn);
     // Note, that we don't create NameChangeRequests here because we don't
     // perform DNS Updates for Solicit. Client must send Request to update
     // DNS.
@@ -2201,7 +2162,6 @@ Dhcpv6Srv::processRequest(const Pkt6Ptr& request) {
 
     Option6ClientFqdnPtr fqdn = processClientFqdn(request, reply);
     assignLeases(request, reply);
-    appendClientFqdn(request, reply, fqdn);
     createNameChangeRequests(reply, fqdn);
 
     return (reply);
@@ -2220,10 +2180,9 @@ Dhcpv6Srv::processRenew(const Pkt6Ptr& renew) {
 
     Option6ClientFqdnPtr fqdn = processClientFqdn(renew, reply);
     renewLeases(renew, reply, fqdn);
-    appendClientFqdn(renew, reply, fqdn);
     createNameChangeRequests(reply, fqdn);
 
-    return reply;
+    return (reply);
 }
 
 Pkt6Ptr

+ 0 - 16
src/bin/dhcp6/dhcp6_srv.h

@@ -383,22 +383,6 @@ protected:
     Option6ClientFqdnPtr processClientFqdn(const Pkt6Ptr& question,
                                            const Pkt6Ptr& answer);
 
-    /// @brief Adds DHCPv6 Client FQDN %Option to the server response.
-    ///
-    /// This function will add the specified FQDN option into the server's
-    /// response when FQDN is not NULL and server is either configured to
-    /// always include the FQDN in the response or client requested it using
-    /// %Option Request %Option.
-    /// This function is exception safe.
-    ///
-    /// @param question A message received from the client.
-    /// @param [out] answer A server's response where FQDN option will be added.
-    /// @param fqdn A DHCPv6 Client FQDN %Option to be added to the server's
-    /// response to a client.
-    void appendClientFqdn(const Pkt6Ptr& question,
-                          Pkt6Ptr& answer,
-                          const Option6ClientFqdnPtr& fqdn);
-
     /// @brief Creates a number of @c isc::dhcp_ddns::NameChangeRequest objects
     /// based on the DHCPv6 Client FQDN %Option.
     ///