From: Francis Dupont Date: Tue, 16 Jul 2019 12:05:40 +0000 (+0200) Subject: [606-drop-packets-in-drop-class] Addressed final comments X-Git-Tag: Kea-1.6.0-beta2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfa5b2c50324e9d2339daa8309774f49a5e7bf3c;p=thirdparty%2Fkea.git [606-drop-packets-in-drop-class] Addressed final comments --- diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index 959ef2b110..880e1e621a 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -2535,7 +2535,7 @@ It is merely echoed by the server. zero or more classes. The second step is to choose a subnet, possibly based on the 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 built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup, using them for pool selection and assigning classes from host reservations. diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 7352d0ebd0..538ed188e6 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -2430,7 +2430,7 @@ should include options from the new option space: zero or more classes. Next, a subnet is chosen, possibly based on the 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 built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup, using them for pool/pd-pool selection and assigning classes from host diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index 129aaddeb1..25604b128a 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -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 #include @@ -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_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_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_0002 = "DHCP4_PACKET_NAK_0002"; 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_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_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_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", diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h index 5d4480cc3d..e749541dfa 100644 --- a/src/bin/dhcp4/dhcp4_messages.h +++ b/src/bin/dhcp4/dhcp4_messages.h @@ -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 #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_0008; 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_0002; extern const isc::log::MessageID DHCP4_PACKET_NAK_0003; diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 4bf6ea1bf5..b530ad191f 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -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 that it was BOOTP packet. -% DHCP4_PACKET_DROP_DROP_CLASS dropped as member of the special DROP class: %1 -This informational message is emitted when an incoming packet was classified -into the special DROP class and dropped. The packet details are displayed. +% DHCP4_PACKET_DROP_0010 dropped as member of the special class 'DROP': %1 +This debug message is emitted when an incoming packet was classified +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 This error message is output when a packet was received from a subnet diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 34aac1f5e4..c406508c7a 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1008,7 +1008,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) { // Check the DROP special class. 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()); isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop", static_cast(1)); diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 712b076481..d4e7fc7c72 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -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 #include @@ -231,7 +231,7 @@ const char* values[] = { "DHCP6_OPEN_SOCKET", "opening service sockets on port %1", "DHCP6_OPEN_SOCKET_FAIL", "failed to open socket: %1", "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_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", diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h index f5580fd590..ccb62f0f7f 100644 --- a/src/bin/dhcp6/dhcp6_messages.h +++ b/src/bin/dhcp6/dhcp6_messages.h @@ -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 #define DHCP6_MESSAGES_H diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index 119ef9bfe3..c980593f61 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -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 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 -This informational message is emitted when an incoming packet was classified -into the special DROP class and dropped. The packet details are displayed. +% DHCP6_PACKET_DROP_DROP_CLASS dropped as member of the special class 'DROP': %1 +This debug message is emitted when an incoming packet was classified +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 The DHCPv6 server has received a packet that it is unable to diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 3166f4bd59..c07ab6f311 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -685,7 +685,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) { // Check the DROP special class. 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()); StatsMgr::instance().addValue("pkt6-receive-drop", static_cast(1));