From: Marcin Siodelski Date: Mon, 20 Jan 2014 15:23:09 +0000 (+0100) Subject: [3295] Removed unused function which included Client FQDN option. X-Git-Tag: bind10-1.2.0beta1-release~83^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02a70f5541d4577f28114045496798c13e618944;p=thirdparty%2Fkea.git [3295] Removed unused function which included Client FQDN option. --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 10b2052e26..0eebad1b57 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/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& 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 diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h index 3a5ff87f86..6fe8dc29fd 100644 --- a/src/bin/dhcp6/dhcp6_srv.h +++ b/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. ///