Help with dhcp-eval for logging
Bruce Hudson
Bruce.Hudson at Dal.Ca
Mon Oct 2 17:23:40 UTC 2006
> if exists agent.circuit-id
> {
> log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".",
> leased-address), " is connected to ", binary-to-ascii
> (10, 16, "", option agent.circuit-id)));
> }
>
> My log file outputs this:
> Oct 2 10:53:13 dhcpd1 dhcpd: Lease for 172.16.254.103 is connected to
> 19521169911387413618121002132412592149662774528215
>
> It should be something similar to this:
> Oct 2 10:53:13 dhcpd1 dhcpd: Lease for 172.16.254.103 is connected to
> LAB_6252/DSL10:vlan7
>
> Any pointers on where I am wrong in my log statement?
You are calling binary-to-ascii on the circuit ID. This function is
parsing the circuit-ID option as 10 16-bit numbers and converting it
into 10 5-digit decimal numbers, all run together since you specify a
null separator. Just log the option.
--
Bruce A. Hudson | Bruce.Hudson at Dal.CA
UCIS, Networks and Systems |
Dalhousie University |
Halifax, Nova Scotia, Canada | (902) 494-3405
More information about the dhcp-users
mailing list