mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-04 16:05:17 +00:00
[606-drop-packets-in-drop-class] Addressed final comments
This commit is contained in:
@@ -2535,7 +2535,7 @@ It is merely echoed by the server.
|
|||||||
zero or more classes.
|
zero or more classes.
|
||||||
The second step is to choose a subnet, possibly based on the
|
The second step is to choose a subnet, possibly based on the
|
||||||
class information. When the incoming packet is in the special
|
class information. When the incoming packet is in the special
|
||||||
class, "DROP", it is dropped and an information message logged.
|
class, "DROP", it is dropped and a debug message logged.
|
||||||
The next step is to evaluate class expressions depending on the
|
The next step is to evaluate class expressions depending on the
|
||||||
built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
|
built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
|
||||||
using them for pool selection and assigning classes from host reservations.
|
using them for pool selection and assigning classes from host reservations.
|
||||||
|
@@ -2430,7 +2430,7 @@ should include options from the new option space:
|
|||||||
zero or more classes.
|
zero or more classes.
|
||||||
Next, a subnet is chosen, possibly based on the
|
Next, a subnet is chosen, possibly based on the
|
||||||
class information. When the incoming packet is in the special
|
class information. When the incoming packet is in the special
|
||||||
class, "DROP", it is dropped and an information message logged.
|
class, "DROP", it is dropped and a debug message logged.
|
||||||
After that, class expressions are evaluated depending on the
|
After that, class expressions are evaluated depending on the
|
||||||
built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
|
built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
|
||||||
using them for pool/pd-pool selection and assigning classes from host
|
using them for pool/pd-pool selection and assigning classes from host
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu Jun 27 2019 19:56
|
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Tue Jul 16 2019 11:03
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <log/message_types.h>
|
#include <log/message_types.h>
|
||||||
@@ -93,7 +93,7 @@ extern const isc::log::MessageID DHCP4_PACKET_DROP_0006 = "DHCP4_PACKET_DROP_000
|
|||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0007 = "DHCP4_PACKET_DROP_0007";
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0007 = "DHCP4_PACKET_DROP_0007";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0008 = "DHCP4_PACKET_DROP_0008";
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0008 = "DHCP4_PACKET_DROP_0008";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0009 = "DHCP4_PACKET_DROP_0009";
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0009 = "DHCP4_PACKET_DROP_0009";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_DROP_CLASS = "DHCP4_PACKET_DROP_DROP_CLASS";
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0010 = "DHCP4_PACKET_DROP_0010";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0001 = "DHCP4_PACKET_NAK_0001";
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0001 = "DHCP4_PACKET_NAK_0001";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0002 = "DHCP4_PACKET_NAK_0002";
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0002 = "DHCP4_PACKET_NAK_0002";
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0003 = "DHCP4_PACKET_NAK_0003";
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0003 = "DHCP4_PACKET_NAK_0003";
|
||||||
@@ -229,7 +229,7 @@ const char* values[] = {
|
|||||||
"DHCP4_PACKET_DROP_0007", "%1: failed to process packet: %2",
|
"DHCP4_PACKET_DROP_0007", "%1: failed to process packet: %2",
|
||||||
"DHCP4_PACKET_DROP_0008", "%1: DHCP service is globally disabled",
|
"DHCP4_PACKET_DROP_0008", "%1: DHCP service is globally disabled",
|
||||||
"DHCP4_PACKET_DROP_0009", "%1: Option 53 missing (no DHCP message type), is this a BOOTP packet?",
|
"DHCP4_PACKET_DROP_0009", "%1: Option 53 missing (no DHCP message type), is this a BOOTP packet?",
|
||||||
"DHCP4_PACKET_DROP_DROP_CLASS", "dropped as member of the special DROP class: %1",
|
"DHCP4_PACKET_DROP_0010", "dropped as member of the special class 'DROP': %1",
|
||||||
"DHCP4_PACKET_NAK_0001", "%1: failed to select a subnet for incoming packet, src %2, type %3",
|
"DHCP4_PACKET_NAK_0001", "%1: failed to select a subnet for incoming packet, src %2, type %3",
|
||||||
"DHCP4_PACKET_NAK_0002", "%1: invalid address %2 requested by INIT-REBOOT",
|
"DHCP4_PACKET_NAK_0002", "%1: invalid address %2 requested by INIT-REBOOT",
|
||||||
"DHCP4_PACKET_NAK_0003", "%1: failed to advertise a lease, client sent ciaddr %2, requested-ip-address %3",
|
"DHCP4_PACKET_NAK_0003", "%1: failed to advertise a lease, client sent ciaddr %2, requested-ip-address %3",
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu Jun 27 2019 19:56
|
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Tue Jul 16 2019 11:03
|
||||||
|
|
||||||
#ifndef DHCP4_MESSAGES_H
|
#ifndef DHCP4_MESSAGES_H
|
||||||
#define DHCP4_MESSAGES_H
|
#define DHCP4_MESSAGES_H
|
||||||
@@ -94,7 +94,7 @@ extern const isc::log::MessageID DHCP4_PACKET_DROP_0006;
|
|||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0007;
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0007;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0008;
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0008;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_0009;
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0009;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_DROP_DROP_CLASS;
|
extern const isc::log::MessageID DHCP4_PACKET_DROP_0010;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0001;
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0001;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0002;
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0002;
|
||||||
extern const isc::log::MessageID DHCP4_PACKET_NAK_0003;
|
extern const isc::log::MessageID DHCP4_PACKET_NAK_0003;
|
||||||
|
@@ -509,9 +509,9 @@ This debug message is issued when a packet is dropped because it did contain
|
|||||||
option 53 and thus has no DHCP message type. The most likely explanation is
|
option 53 and thus has no DHCP message type. The most likely explanation is
|
||||||
that it was BOOTP packet.
|
that it was BOOTP packet.
|
||||||
|
|
||||||
% DHCP4_PACKET_DROP_DROP_CLASS dropped as member of the special DROP class: %1
|
% DHCP4_PACKET_DROP_0010 dropped as member of the special class 'DROP': %1
|
||||||
This informational message is emitted when an incoming packet was classified
|
This debug message is emitted when an incoming packet was classified
|
||||||
into the special DROP class and dropped. The packet details are displayed.
|
into the special class 'DROP' and dropped. The packet details are displayed.
|
||||||
|
|
||||||
% DHCP4_PACKET_NAK_0001 %1: failed to select a subnet for incoming packet, src %2, type %3
|
% DHCP4_PACKET_NAK_0001 %1: failed to select a subnet for incoming packet, src %2, type %3
|
||||||
This error message is output when a packet was received from a subnet
|
This error message is output when a packet was received from a subnet
|
||||||
|
@@ -1008,7 +1008,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
|
|||||||
|
|
||||||
// Check the DROP special class.
|
// Check the DROP special class.
|
||||||
if (query->inClass("DROP")) {
|
if (query->inClass("DROP")) {
|
||||||
LOG_INFO(packet4_logger, DHCP4_PACKET_DROP_DROP_CLASS)
|
LOG_DEBUG(packet4_logger, DBGLVL_TRACE_BASIC, DHCP4_PACKET_DROP_0010)
|
||||||
.arg(query->toText());
|
.arg(query->toText());
|
||||||
isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
|
isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
|
||||||
static_cast<int64_t>(1));
|
static_cast<int64_t>(1));
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 20:26
|
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 16 2019 11:03
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <log/message_types.h>
|
#include <log/message_types.h>
|
||||||
@@ -231,7 +231,7 @@ const char* values[] = {
|
|||||||
"DHCP6_OPEN_SOCKET", "opening service sockets on port %1",
|
"DHCP6_OPEN_SOCKET", "opening service sockets on port %1",
|
||||||
"DHCP6_OPEN_SOCKET_FAIL", "failed to open socket: %1",
|
"DHCP6_OPEN_SOCKET_FAIL", "failed to open socket: %1",
|
||||||
"DHCP6_PACKET_DROP_DHCP_DISABLED", "%1: DHCP service is globally disabled",
|
"DHCP6_PACKET_DROP_DHCP_DISABLED", "%1: DHCP service is globally disabled",
|
||||||
"DHCP6_PACKET_DROP_DROP_CLASS", "dropped as member of the special DROP class: %1",
|
"DHCP6_PACKET_DROP_DROP_CLASS", "dropped as member of the special class 'DROP': %1",
|
||||||
"DHCP6_PACKET_DROP_PARSE_FAIL", "failed to parse packet from %1 to %2, received over interface %3, reason: %4",
|
"DHCP6_PACKET_DROP_PARSE_FAIL", "failed to parse packet from %1 to %2, received over interface %3, reason: %4",
|
||||||
"DHCP6_PACKET_DROP_SERVERID_MISMATCH", "%1: dropping packet with server identifier: %2, server is using: %3",
|
"DHCP6_PACKET_DROP_SERVERID_MISMATCH", "%1: dropping packet with server identifier: %2, server is using: %3",
|
||||||
"DHCP6_PACKET_DROP_UNICAST", "%1: dropping unicast %2 packet as this packet should be sent to multicast",
|
"DHCP6_PACKET_DROP_UNICAST", "%1: dropping unicast %2 packet as this packet should be sent to multicast",
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 20:26
|
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 16 2019 11:03
|
||||||
|
|
||||||
#ifndef DHCP6_MESSAGES_H
|
#ifndef DHCP6_MESSAGES_H
|
||||||
#define DHCP6_MESSAGES_H
|
#define DHCP6_MESSAGES_H
|
||||||
|
@@ -505,9 +505,9 @@ has been temporarily disabled. This affects all received DHCP packets. The
|
|||||||
service may be enabled by the "dhcp-enable" control command or automatically
|
service may be enabled by the "dhcp-enable" control command or automatically
|
||||||
after a specified amount of time since receiving "dhcp-disable" command.
|
after a specified amount of time since receiving "dhcp-disable" command.
|
||||||
|
|
||||||
% DHCP6_PACKET_DROP_DROP_CLASS dropped as member of the special DROP class: %1
|
% DHCP6_PACKET_DROP_DROP_CLASS dropped as member of the special class 'DROP': %1
|
||||||
This informational message is emitted when an incoming packet was classified
|
This debug message is emitted when an incoming packet was classified
|
||||||
into the special DROP class and dropped. The packet details are displayed.
|
into the special class 'DROP' and dropped. The packet details are displayed.
|
||||||
|
|
||||||
% DHCP6_PACKET_DROP_PARSE_FAIL failed to parse packet from %1 to %2, received over interface %3, reason: %4
|
% DHCP6_PACKET_DROP_PARSE_FAIL failed to parse packet from %1 to %2, received over interface %3, reason: %4
|
||||||
The DHCPv6 server has received a packet that it is unable to
|
The DHCPv6 server has received a packet that it is unable to
|
||||||
|
@@ -685,7 +685,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
|
|||||||
|
|
||||||
// Check the DROP special class.
|
// Check the DROP special class.
|
||||||
if (query->inClass("DROP")) {
|
if (query->inClass("DROP")) {
|
||||||
LOG_INFO(packet6_logger, DHCP6_PACKET_DROP_DROP_CLASS)
|
LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_PACKET_DROP_DROP_CLASS)
|
||||||
.arg(query->toText());
|
.arg(query->toText());
|
||||||
StatsMgr::instance().addValue("pkt6-receive-drop",
|
StatsMgr::instance().addValue("pkt6-receive-drop",
|
||||||
static_cast<int64_t>(1));
|
static_cast<int64_t>(1));
|
||||||
|
Reference in New Issue
Block a user