Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
9c2cc8c4
Commit
9c2cc8c4
authored
Jul 15, 2014
by
Marcin Siodelski
Browse files
[3390] Use the IP src address to select subnet if ciaddr is not specified.
parent
4477e84e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/dhcp4_srv.cc
View file @
9c2cc8c4
...
...
@@ -1500,6 +1500,15 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& question) const {
subnet
=
CfgMgr
::
instance
().
getSubnet4
(
question
->
getCiaddr
(),
question
->
classes_
);
// Either renewing client or the client that sends DHCPINFORM
// must set the ciaddr. But apparently some clients don't do it,
// so if the client didn't include ciaddr we will use the source
// address.
}
else
if
((
question
->
getLocalAddr
()
!=
bcast
)
&&
(
question
->
getRemoteAddr
()
!=
notset
))
{
subnet
=
CfgMgr
::
instance
().
getSubnet4
(
question
->
getRemoteAddr
(),
question
->
classes_
);
// The message has been received from a directly connected client
// and this client appears to have no address. The IPv4 address
// assigned to the interface on which this message has been received,
...
...
@@ -1549,7 +1558,6 @@ Dhcpv4Srv::accept(const Pkt4Ptr& query) const {
if
(
!
acceptMessageType
(
query
))
{
return
(
false
);
}
// Check if the message from directly connected client (if directly
// connected) should be dropped or processed.
if
(
!
acceptDirectRequest
(
query
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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