BIND 10 #3207: per-client option values (hook lib extension)
BIND 10 Development
do-not-reply at isc.org
Mon Oct 28 16:25:39 UTC 2013
#3207: per-client option values (hook lib extension)
-------------------------------------+-------------------------------------
Reporter: tomek | Owner:
Type: enhancement | UnAssigned
Priority: medium | Status:
Component: dhcp | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-DHCP-20131016
Sub-Project: DHCP | Resolution:
Estimated Difficulty: 0 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by tmark):
* owner: tmark => UnAssigned
* status: assigned => reviewing
Comment:
This submission extends the user check hook library with the ability to
set
options in a DHCP response packet based upon the user registry. If the
DHCP
query is from a registered user, then that user's properties may be used
to
populate options in the response. If the user is not registered, default
users
may be defined which supply default values for the desired properties.
Currently, which options are supported is hard-coded (see pkt_send_co.cc)
and
those two options are boot file and tftp server.
This implementation builds upon 3186, but adds callouts for pkt_receive
and
pkt_send, and supports the same overall logic for both IPv4 an IPv6. The
callouts and their respective tasks are as follows:
1.pkt_receive:
a. Refresh the user registry,
b. Extract user id from DHCP query, store it to context
c. Look up user id in registry, store result to context
2.subnet_select:
a. Retrieve user pointer from context
b. If pointer is null (i.e. user not registered), replace subnet
selection
with restricted subnet
3.pkt_send:
a. Retrieve user id and user pointer from context
b. If user is not null add options based on user, otherwise use default
user
c. Generate user check outcome
Note, that much of the actual callout code is not currently unit tested as
it relies on a good deal of setup. This could be expanded. Additionally,
the code to extract lease value (address or prefix) from the response
packet
is fairly involved as it must navigate packet options and account for
various
permutations. It would be more efficient to add lease_select callout
logic to
grab and store the lease value to the context and use that in pkt_send to
generate the outcome output. Lastly, there should be some thought perhaps
given to packet type checks. For instance, not all response should have
options added or outcome records generated.
--
Ticket URL: <http://bind10.isc.org/ticket/3207#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list