Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
760c652b
Commit
760c652b
authored
Oct 13, 2014
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Plain Diff
[master] Merge branch 'trac3537'
parents
728359ea
bceb259d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_messages.mes
+7
-0
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.cc
+11
-0
No files found.
src/bin/dhcp4/dhcp4_messages.mes
View file @
760c652b
...
@@ -158,6 +158,13 @@ This debug message is issued when the client being in the INIT-REBOOT state
...
@@ -158,6 +158,13 @@ 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
requested an address which is not assigned to him. The server will respond
to this client with DHCPNAK.
to this client with DHCPNAK.
% DHCP4_INVALID_RELAY_INFO malformed packet received from client-id %1, hwaddr %2: %3
This message is logged when the client sends invalid combination of
values in the giaddr and hops fields. If the packet is relayed it should
contain non-zero values in both fields. If the packet is sent from the
directly connected client, both values should be set to zero. All other
combinations are invalid and trigger packet drop.
% DHCP4_LEASE_ADVERT lease %1 advertised (client client-id %2, hwaddr %3)
% DHCP4_LEASE_ADVERT lease %1 advertised (client client-id %2, hwaddr %3)
This debug message indicates that the server successfully advertised
This debug message indicates that the server successfully advertised
a lease. It is up to the client to choose one server out of othe advertised
a lease. It is up to the client to choose one server out of othe advertised
...
...
src/bin/dhcp4/dhcp4_srv.cc
View file @
760c652b
...
@@ -1632,10 +1632,21 @@ Dhcpv4Srv::accept(const Pkt4Ptr& query) const {
...
@@ -1632,10 +1632,21 @@ Dhcpv4Srv::accept(const Pkt4Ptr& query) const {
bool
bool
Dhcpv4Srv
::
acceptDirectRequest
(
const
Pkt4Ptr
&
pkt
)
const
{
Dhcpv4Srv
::
acceptDirectRequest
(
const
Pkt4Ptr
&
pkt
)
const
{
try
{
try
{
// This is the first call to the isRelayed function for this packet,
// so we have to catch exceptions which will be emitted if the
// packet contains invalid combination of hops and giaddr. For all
// other invocations of isRelayed function we will not catch
// exceptions because we eliminate malformed packets here.
if
(
pkt
->
isRelayed
())
{
if
(
pkt
->
isRelayed
())
{
return
(
true
);
return
(
true
);
}
}
}
catch
(
const
Exception
&
ex
)
{
}
catch
(
const
Exception
&
ex
)
{
OptionPtr
client_id
=
pkt
->
getOption
(
DHO_DHCP_CLIENT_IDENTIFIER
);
HWAddrPtr
hwaddr
=
pkt
->
getHWAddr
();
LOG_INFO
(
dhcp4_logger
,
DHCP4_INVALID_RELAY_INFO
)
.
arg
(
client_id
?
client_id
->
toText
()
:
"(no client-id)"
)
.
arg
(
hwaddr
?
hwaddr
->
toText
()
:
"(no hwaddr info)"
)
.
arg
(
ex
.
what
());
return
(
false
);
return
(
false
);
}
}
// The source address must not be zero for the DHCPINFORM message from
// The source address must not be zero for the DHCPINFORM message from
...
...
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