Option 82 ASCII logging

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Dec 24 11:54:31 UTC 2006


>X-Original-To: dhcp-users at webster.isc.org
>X-Greylist: delayed 8707 seconds by postgrey-1.24 at longship.isc.org; Sun, 24 
Dec 2006 01:07:21 UTC
>Date: Sun, 24 Dec 2006 00:41:42 +0200
>
>Dear all,
>
>I do logging for Option 82 attributes and my log looks like:
>
>Dec 23 22:36:47 sds1 dhcpd: Lease for 172.25.15.41 raw option-82 info is 
>CID: 1.3.2.193 AID: 4c.4c.2d.48.51.2d.30.30.31.2d.30.31
>Is there any way  to log AID with ASCII symbols, basically I want my log 
>to show AID: LL-HQ-001-01
>
>My config:
>
>if exists agent.circuit-id
>{
>        log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", 
>leased-address), " is connected to interface ",
>        binary-to-ascii (10, 8, ".", substring ( option 
>agent.circuit-id, 0, 2)), " VLAN ",
>        binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 
>2, 2)),  " on switch ",
>        binary-to-ascii(16, 8, ".", substring( option agent.remote-id, 
>0, 2))));
>}
>
Take out the calls to binary-to-ascii. They convert a given string to
the hex codes. If you know that the string is using plain text then log
it directly as such.

regards,
-glenn


More information about the dhcp-users mailing list