From a5d9347df7b587de049c405cfbcc1a9153d31d08 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 16 Mar 2022 17:29:57 +0100 Subject: [PATCH] [#1548] hook point renamed to ddns_update4 --- src/bin/dhcp4/dhcp4_srv.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 4d645565db..0b6e6027a4 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -107,7 +107,7 @@ struct Dhcp4Hooks { hook_index_buffer4_send_ = HooksManager::registerHook("buffer4_send"); hook_index_lease4_decline_ = HooksManager::registerHook("lease4_decline"); hook_index_host4_identifier_ = HooksManager::registerHook("host4_identifier"); - hook_index_ddns_update_ = HooksManager::registerHook("ddns_update"); + hook_index_ddns_update_ = HooksManager::registerHook("ddns_update4"); } }; @@ -2104,10 +2104,12 @@ Dhcpv4Srv::processClientName(Dhcpv4Exchange& ex) { Pkt4Ptr query = ex.getQuery(); CalloutHandlePtr callout_handle = getCalloutHandle(query); + Subnet4Ptr subnet = ex.getContext()->subnet_; // Pass incoming packet as argument callout_handle->setArgument("query4", query); callout_handle->setArgument("response4", resp); + callout_handle->setArgument("subnet4", subnet); callout_handle->setArgument("hostname", hostname); callout_handle->setArgument("fwd-update", fqdn_fwd); callout_handle->setArgument("rev-update", fqdn_rev);