break;
case DHCPV6_DHCPV4_QUERY:
- rsp = processDhcp4Query(query);
+ processDhcp4Query(query);
break;
default:
return (reply);
}
-Pkt6Ptr
+void
Dhcpv6Srv::processDhcp4Query(const Pkt6Ptr& dhcp4_query) {
sanityCheck(dhcp4_query, OPTIONAL, OPTIONAL);
Dhcp6to4Ipc::instance().send(dhcp4_query);
}
- // Our job is finished
- return (Pkt6Ptr());
+ // This method does not return anything as we already sent back
+ // the response via Dhcp6To4Ipc.
}
void Dhcpv6Srv::classifyByVendor(const Pkt6Ptr& pkt, std::string& classes) {
/// @brief Processes incoming DHCPv4-query message.
///
+ /// It always returns NULL, as there is nothing to be sent back to the
+ /// client at this time. The message was sent to DHCPv4 server using
+ /// @ref isc::dhcp::Dhcp6to4Ipc::handler()). We will send back a response
+ /// to the client once we get back DHCP4-REPLY from the DHCPv4 server.
+ ///
/// @param dhcp4_query message received from client
- /// @return Reply message to be sent to the client (always NULL
- /// as the response will be returned after by
- /// @ref isc::dhcp::Dhcp6to4Ipc::handler()).
- Pkt6Ptr processDhcp4Query(const Pkt6Ptr& dhcp4_query);
+ void processDhcp4Query(const Pkt6Ptr& dhcp4_query);
/// @brief Selects a subnet for a given client's packet.
///
// Don't use getType(): get the message type from the buffer as we
// want to know if it is a relayed message (vs. internal message type).
+ // getType() always returns the type of internal message.
uint8_t msg_type = buf[0];
if ((msg_type == DHCPV6_RELAY_FORW) || (msg_type == DHCPV6_RELAY_REPL)) {
pkt->setRemotePort(DHCP6_SERVER_PORT);