Commit 980154e7 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[4109a] Minor clarifications.

parent 8d5e15f0
......@@ -632,7 +632,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
break;
case DHCPV6_DHCPV4_QUERY:
rsp = processDhcp4Query(query);
processDhcp4Query(query);
break;
default:
......@@ -2788,7 +2788,7 @@ Dhcpv6Srv::processInfRequest(const Pkt6Ptr& inf_request) {
return (reply);
}
Pkt6Ptr
void
Dhcpv6Srv::processDhcp4Query(const Pkt6Ptr& dhcp4_query) {
sanityCheck(dhcp4_query, OPTIONAL, OPTIONAL);
......@@ -2804,8 +2804,8 @@ Dhcpv6Srv::processDhcp4Query(const Pkt6Ptr& dhcp4_query) {
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) {
......
......@@ -291,11 +291,13 @@ protected:
/// @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.
///
......
......@@ -87,6 +87,7 @@ void Dhcp6to4Ipc::handler() {
// 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment