3.109.12. AllocateDoneHook Previous topic Parent topic Child topic Next topic

AllocateDoneHook provides access to the received DHPCPv6 reply and allows modifying the results after Radiator has processed them, but before they are passed to AuthBy DYNADDRESS and made available for MapAttribute. The option values are in their native format. See the relevant RFCs for the details.
Note
This example requires domain_list is specified with MapAttribute. Radiator will not otherwise request OPTION_DOMAIN_LIST from DHCPv6.
# Domain list is in RFC 1035 format. Format it later.
AllocateDoneHook sub { my $result = $_[0]; my $reply = $_[1]; \
my @o = $reply->option($Radius::DHCPv6::OPTION_DOMAIN_LIST); \
$result->{domain_list} = $o[1] if $o[0]; }