3.52.4. MapResultHook Previous topic Parent topic Child topic Next topic

MapResultHook allows modifying the allocation results after they have been received, and before Radiator has processed the MapAttribute definitions.
This example complies with how some vendors require uplink addresses as host routes with a /128 prefix for the requesting routers.
MapAttribute iaprefix, Delegated-IPv6-Prefix
MapAttribute iaaddr, Framed-IPv6-Prefix
MapResultHook sub { my $result = $_[0]; \
      $result->{iaaddr} .= "/128" if $result->{iaaddr}; }