Add caching to ip_ntoh()?

Boris Lytochkin lytboris at yandex-team.ru
Tue Mar 15 13:23:49 CET 2016


Hi.

We are running FreeRADIUS with a local patch that uses PTR record of NAS IP address instead of shortname in logs - this greatly helps with bulk client specifications like:
=====================
client mgmt_net_location_1 {
ipv4addr = 10.0.10.0/24
...
}
=====================

And in radiusd.log  we got 'Login OK ... from  <PTR>' instead of 'Login OK ... from  %{client:shortname}'.

While looking for a proper way to `upstream'ize` this patch I came across ip_ntoh function that does resolving but does not cache results. Am I right that adding cache to this function (driven by 
fr_hash) and adding configuration knob for client is a good way to get rid of our local patch in favor of upstream?
Any other thoughts?

-- 
Boris Lytochkin
Yandex NOC
+7 (495) 739 70 00 ext. 7671



More information about the Freeradius-Devel mailing list