Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
415
Issues
415
List
Boards
Labels
Service Desk
Milestones
Merge Requests
65
Merge Requests
65
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
c584eade
Commit
c584eade
authored
Jul 23, 2014
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[3320] Address review comments.
parent
11226ee5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_messages.mes
+1
-1
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.cc
+3
-3
src/bin/dhcp4/tests/dhcp4_client.cc
src/bin/dhcp4/tests/dhcp4_client.cc
+5
-1
src/bin/dhcp4/tests/dhcp4_client.h
src/bin/dhcp4/tests/dhcp4_client.h
+6
-5
No files found.
src/bin/dhcp4/dhcp4_messages.mes
View file @
c584eade
...
...
@@ -147,7 +147,7 @@ point, the setting of the flag instructs the server not to choose a
subnet, an action that severely limits further processing; the server
will be only able to offer global options - no addresses will be assigned.
% DHCP4_INVALID_ADDRESS_INIT_REBOOT
client having client-id %1, hwaddr %2 and being in the INIT-REBOOT state requested invalid address %3
% DHCP4_INVALID_ADDRESS_INIT_REBOOT
invalid address %1 requested by INIT-REBOOT client (id: %2, hwaddr: %3)
This debug message is issued when the client being in the INIT-REBOOT state
requested an address which is not assigned to him. The server will respond
to this client with DHCPNAK.
...
...
src/bin/dhcp4/dhcp4_srv.cc
View file @
c584eade
...
...
@@ -976,9 +976,9 @@ Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
if
(
!
lease
)
{
LOG_DEBUG
(
dhcp4_logger
,
DBG_DHCP4_DETAIL
,
DHCP4_INVALID_ADDRESS_INIT_REBOOT
)
.
arg
(
hint
.
toText
())
.
arg
(
client_id
?
client_id
->
toText
()
:
"(no client-id)"
)
.
arg
(
hwaddr
?
hwaddr
->
toText
()
:
"(no hwaddr info)"
)
.
arg
(
hint
.
toText
());
.
arg
(
hwaddr
?
hwaddr
->
toText
()
:
"(no hwaddr info)"
);
answer
->
setType
(
DHCPNAK
);
answer
->
setYiaddr
(
IOAddress
(
"0.0.0.0"
));
...
...
@@ -1111,7 +1111,7 @@ Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
}
else
{
// Allocation engine did not allocate a lease. The engine logged
// cause of that failure. The onl
x
y thing left is to insert
// cause of that failure. The only thing left is to insert
// status code to pass the sad news to the client.
LOG_DEBUG
(
dhcp4_logger
,
DBG_DHCP4_DETAIL
,
fake_allocation
?
...
...
src/bin/dhcp4/tests/dhcp4_client.cc
View file @
c584eade
...
...
@@ -243,7 +243,11 @@ Dhcp4Client::doRequest() {
void
Dhcp4Client
::
includePRL
()
{
if
(
!
requested_options_
.
empty
()
&&
context_
.
query_
)
{
if
(
!
context_
.
query_
)
{
isc_throw
(
Dhcp4ClientError
,
"pointer to the query must not be NULL"
" when adding option codes to the PRL option"
);
}
else
if
(
!
requested_options_
.
empty
())
{
// Include Parameter Request List if at least one option code
// has been specified to be requested.
OptionUint8ArrayPtr
prl
(
new
OptionUint8Array
(
Option
::
V4
,
...
...
src/bin/dhcp4/tests/dhcp4_client.h
View file @
c584eade
...
...
@@ -173,7 +173,7 @@ public:
/// - SELECTING - client is trying to obtain a new lease and it has selected
/// the server using the DHCPDISCOVER.
/// - INIT-REBOOT - client cached an address it was previously using and is
/// now trying to verify if this addres is still valid.
/// now trying to verify if this addres
s
is still valid.
/// - RENEW - client's renewal timer has passed and the client is trying to
/// extend the lifetime of the lease.
/// - REBIND - client's rebind timer has passed and the client is trying to
...
...
@@ -296,7 +296,7 @@ public:
private:
/// @brief Creates and add
d
s Requested IP Address option to the client's
/// @brief Creates and adds Requested IP Address option to the client's
/// query.
///
/// @param addr Address to be added in the Requested IP Address option.
...
...
@@ -324,9 +324,10 @@ private:
/// @brief Include PRL Option in the query message.
///
/// This function creates the instance of the PRL option and adds
/// option codes from the @c requested_options_ to it. It later adds
/// the PRL option to the @c context_.query_ message if it is non-NULL.
/// This function creates the instance of the PRL (Parameter Request List)
/// option and adds option codes from the @c requested_options_ to it.
/// It later adds the PRL option to the @c context_.query_ message
/// if it is non-NULL.
void
includePRL
();
/// @brief Simulates reception of the message from the server.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment