2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

Merge branch 'kea-fb2' of https://github.com./nchaigne/kea into pullreq8

# Conflicts:
#	src/bin/dhcp4/dhcp4_hooks.dox
This commit is contained in:
Tomek Mrugalski 2015-11-30 13:12:05 +01:00
commit 28f32bb5f7
2 changed files with 8 additions and 1 deletions

View File

@ -204,6 +204,7 @@ packet processing. Hook points that are not specific to packet processing
- @b Arguments: - @b Arguments:
- name: @b response4, type: isc::dhcp::Pkt4Ptr, direction: <b>in/out</b> - name: @b response4, type: isc::dhcp::Pkt4Ptr, direction: <b>in/out</b>
- name: @b query4, type: isc::dhcp::Pkt4Ptr, direction: <b>in</b>
- @b Description: this callout is executed when server's response - @b Description: this callout is executed when server's response
is about to be sent back to the client. The sole argument "response4" is about to be sent back to the client. The sole argument "response4"
@ -213,7 +214,10 @@ packet processing. Hook points that are not specific to packet processing
of the @c Pkt4 object can be modified at this time, except @c buffer_out_. of the @c Pkt4 object can be modified at this time, except @c buffer_out_.
(This is scratch space used for constructing the packet after all (This is scratch space used for constructing the packet after all
pkt4_send callouts are complete, so any changes to that field will pkt4_send callouts are complete, so any changes to that field will
be overwritten.) be overwritten.)\n\n
The argument query4 contains a pointer to the corresponding query packet
(allowing to perform correlation between response and query). This object
cannot be modified.
- <b>Next step action</b>: if any callout installed on the "pkt4_send" hook - <b>Next step action</b>: if any callout installed on the "pkt4_send" hook
sets the next step action to SKIP, the server will not construct the raw sets the next step action to SKIP, the server will not construct the raw

View File

@ -697,6 +697,9 @@ Dhcpv4Srv::run() {
// Set our response // Set our response
callout_handle->setArgument("response4", rsp); callout_handle->setArgument("response4", rsp);
// Also pass the corresponding query packet as argument
callout_handle->setArgument("query4", query);
// Call all installed callouts // Call all installed callouts
HooksManager::callCallouts(hook_index_pkt4_send_, HooksManager::callCallouts(hook_index_pkt4_send_,
*callout_handle); *callout_handle);