Add radius server hostname to tickets

Alan DeKok aland at deployingradius.com
Thu Apr 9 10:39:36 CEST 2009


Stephan Jaeger wrote:
> i'd like to add the radius server's hostname to the tickets, do be able
> to identify over which server it came in later. For that i've added a
> new internal freeradius attribute "Server-Hostname" and a block with a
> gethostname() call to xlat.c.
> 
> I now update the requests with unlang and add an attribute with
> %{Server-Hostname} as value.

  Why not just statically configure the hostname in radiusd.conf?

...
	server_hostname = "foo.example.com"
...

  And then update the code at run time, with:

	Server-Hostname = "%{config:server_hostname}"


  The configuration files are actually a list (in the lisp sense), with
nested lists, and arbitrary values.  You can put pretty much anything
you want in them, so long as it's properly formatted.

  Alan DeKok.



More information about the Freeradius-Devel mailing list