Skip to content

Commit 9b4a2d2

Browse files
committed
[#2820] addressed review comments
1 parent 45eccb3 commit 9b4a2d2

8 files changed

+44
-8
lines changed

src/bin/dhcp4/dhcp4_messages.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ extern const isc::log::MessageID DHCP4_PACKET_OPTION_UNPACK_FAIL = "DHCP4_PACKET
138138
extern const isc::log::MessageID DHCP4_PACKET_PACK = "DHCP4_PACKET_PACK";
139139
extern const isc::log::MessageID DHCP4_PACKET_PACK_FAIL = "DHCP4_PACKET_PACK_FAIL";
140140
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION = "DHCP4_PACKET_PROCESS_EXCEPTION";
141+
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION_MAIN = "DHCP4_PACKET_PROCESS_EXCEPTION_MAIN";
141142
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION = "DHCP4_PACKET_PROCESS_STD_EXCEPTION";
143+
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN = "DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN";
142144
extern const isc::log::MessageID DHCP4_PACKET_QUEUE_FULL = "DHCP4_PACKET_QUEUE_FULL";
143145
extern const isc::log::MessageID DHCP4_PACKET_RECEIVED = "DHCP4_PACKET_RECEIVED";
144146
extern const isc::log::MessageID DHCP4_PACKET_SEND = "DHCP4_PACKET_SEND";
@@ -324,7 +326,9 @@ const char* values[] = {
324326
"DHCP4_PACKET_PACK", "%1: preparing on-wire format of the packet to be sent",
325327
"DHCP4_PACKET_PACK_FAIL", "%1: preparing on-wire-format of the packet to be sent failed %2",
326328
"DHCP4_PACKET_PROCESS_EXCEPTION", "%1: exception occurred during packet processing",
329+
"DHCP4_PACKET_PROCESS_EXCEPTION_MAIN", "exception occurred during packet processing",
327330
"DHCP4_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2",
331+
"DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN", "exception occurred during packet processing: %1",
328332
"DHCP4_PACKET_QUEUE_FULL", "multi-threading packet queue is full",
329333
"DHCP4_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6",
330334
"DHCP4_PACKET_SEND", "%1: trying to send packet %2 (type %3) from %4:%5 to %6:%7 on interface %8",

src/bin/dhcp4/dhcp4_messages.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ extern const isc::log::MessageID DHCP4_PACKET_OPTION_UNPACK_FAIL;
139139
extern const isc::log::MessageID DHCP4_PACKET_PACK;
140140
extern const isc::log::MessageID DHCP4_PACKET_PACK_FAIL;
141141
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION;
142+
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION_MAIN;
142143
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION;
144+
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN;
143145
extern const isc::log::MessageID DHCP4_PACKET_QUEUE_FULL;
144146
extern const isc::log::MessageID DHCP4_PACKET_RECEIVED;
145147
extern const isc::log::MessageID DHCP4_PACKET_SEND;

src/bin/dhcp4/dhcp4_messages.mes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,12 +789,26 @@ during packet processing that was not caught by other, more specific
789789
exception handlers. This packet will be dropped and the server will
790790
continue operation.
791791

792+
% DHCP4_PACKET_PROCESS_EXCEPTION_MAIN exception occurred during packet processing
793+
This error message indicates that a non-standard exception was raised
794+
during packet processing that was not caught by other, more specific
795+
exception handlers. This packet will be dropped and the server will
796+
continue operation. This error message may appear in main server processing
797+
loop.
798+
792799
% DHCP4_PACKET_PROCESS_STD_EXCEPTION %1: exception occurred during packet processing: %2
793800
This error message indicates that a standard exception was raised
794801
during packet processing that was not caught by other, more specific
795802
exception handlers. This packet will be dropped and the server will
796803
continue operation.
797804

805+
% DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN exception occurred during packet processing: %1
806+
This error message indicates that a standard exception was raised
807+
during packet processing that was not caught by other, more specific
808+
exception handlers. This packet will be dropped and the server will
809+
continue operation. This error message may appear in main server processing
810+
loop.
811+
798812
% DHCP4_PACKET_QUEUE_FULL multi-threading packet queue is full
799813
A debug message noting that the multi-threading packet queue is full so
800814
the oldest packet of the queue was dropped to make room for the received one.

src/bin/dhcp4/dhcp4_srv.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,15 +1136,13 @@ Dhcpv4Srv::run() {
11361136
} catch (const std::exception& e) {
11371137
// General catch-all exception that are not caught by more specific
11381138
// catches. This one is for exceptions derived from std::exception.
1139-
LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_STD_EXCEPTION)
1140-
.arg("[no hwaddr info], cid=[no info], tid=[no info]")
1139+
LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN)
11411140
.arg(e.what());
11421141
} catch (...) {
11431142
// General catch-all exception that are not caught by more specific
11441143
// catches. This one is for other exceptions, not derived from
11451144
// std::exception.
1146-
LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION)
1147-
.arg("[no hwaddr info], cid=[no info], tid=[no info]");
1145+
LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION_MAIN);
11481146
}
11491147
}
11501148

src/bin/dhcp6/dhcp6_messages.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ extern const isc::log::MessageID DHCP6_PACKET_DROP_SERVERID_MISMATCH = "DHCP6_PA
115115
extern const isc::log::MessageID DHCP6_PACKET_DROP_UNICAST = "DHCP6_PACKET_DROP_UNICAST";
116116
extern const isc::log::MessageID DHCP6_PACKET_OPTIONS_SKIPPED = "DHCP6_PACKET_OPTIONS_SKIPPED";
117117
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION = "DHCP6_PACKET_PROCESS_EXCEPTION";
118+
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION_MAIN = "DHCP6_PACKET_PROCESS_EXCEPTION_MAIN";
118119
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL = "DHCP6_PACKET_PROCESS_FAIL";
119120
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION = "DHCP6_PACKET_PROCESS_STD_EXCEPTION";
121+
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN = "DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN";
120122
extern const isc::log::MessageID DHCP6_PACKET_QUEUE_FULL = "DHCP6_PACKET_QUEUE_FULL";
121123
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED = "DHCP6_PACKET_RECEIVED";
122124
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL = "DHCP6_PACKET_RECEIVE_FAIL";
@@ -291,8 +293,10 @@ const char* values[] = {
291293
"DHCP6_PACKET_DROP_UNICAST", "%1: dropping unicast %2 packet as this packet should be sent to multicast",
292294
"DHCP6_PACKET_OPTIONS_SKIPPED", "%1: An error unpacking an option, caused subsequent options to be skipped: %2",
293295
"DHCP6_PACKET_PROCESS_EXCEPTION", "%1: exception occurred during packet processing",
296+
"DHCP6_PACKET_PROCESS_EXCEPTION_MAIN", "exception occurred during packet processing",
294297
"DHCP6_PACKET_PROCESS_FAIL", "%1: processing of %2 message received from %3 failed: %4",
295298
"DHCP6_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2",
299+
"DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN", "exception occurred during packet processing: %1",
296300
"DHCP6_PACKET_QUEUE_FULL", "multi-threading packet queue is full",
297301
"DHCP6_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6",
298302
"DHCP6_PACKET_RECEIVE_FAIL", "error on attempt to receive packet: %1",

src/bin/dhcp6/dhcp6_messages.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ extern const isc::log::MessageID DHCP6_PACKET_DROP_SERVERID_MISMATCH;
116116
extern const isc::log::MessageID DHCP6_PACKET_DROP_UNICAST;
117117
extern const isc::log::MessageID DHCP6_PACKET_OPTIONS_SKIPPED;
118118
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION;
119+
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION_MAIN;
119120
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL;
120121
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION;
122+
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN;
121123
extern const isc::log::MessageID DHCP6_PACKET_QUEUE_FULL;
122124
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED;
123125
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL;

src/bin/dhcp6/dhcp6_messages.mes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,13 @@ during packet processing that was not caught by other, more specific
658658
exception handlers. This packet will be dropped and the server will
659659
continue operation.
660660

661+
% DHCP6_PACKET_PROCESS_EXCEPTION_MAIN exception occurred during packet processing
662+
This error message indicates that a non-standard exception was raised
663+
during packet processing that was not caught by other, more specific
664+
exception handlers. This packet will be dropped and the server will
665+
continue operation. This error message may appear in main server processing
666+
loop.
667+
661668
% DHCP6_PACKET_PROCESS_FAIL %1: processing of %2 message received from %3 failed: %4
662669
This is a general catch-all message indicating that the processing of the
663670
specified packet type from the indicated address failed. The reason is given in the
@@ -669,6 +676,13 @@ during packet processing that was not caught by other, more specific
669676
exception handlers. This packet will be dropped and the server will
670677
continue operation.
671678

679+
% DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN exception occurred during packet processing: %1
680+
This error message indicates that a standard exception was raised
681+
during packet processing that was not caught by other, more specific
682+
exception handlers. This packet will be dropped and the server will
683+
continue operation. This error message may appear in main server processing
684+
loop.
685+
672686
% DHCP6_PACKET_QUEUE_FULL multi-threading packet queue is full
673687
A debug message noting that the multi-threading packet queue is full so
674688
the oldest packet of the queue was dropped to make room for the received one.

src/bin/dhcp6/dhcp6_srv.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,13 @@ Dhcpv6Srv::run() {
617617
} catch (const std::exception& e) {
618618
// General catch-all standard exceptions that are not caught by more
619619
// specific catches.
620-
LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_STD_EXCEPTION)
621-
.arg("duid=[no info], [no hwaddr info], tid=[no info]")
620+
LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN)
622621
.arg(e.what());
623622

624623
} catch (...) {
625624
// General catch-all non-standard exception that are not caught
626625
// by more specific catches.
627-
LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION)
628-
.arg("duid=[no info], [no hwaddr info], tid=[no info]");
626+
LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION_MAIN);
629627
}
630628
}
631629

0 commit comments

Comments
 (0)