linelog (special character)

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Apr 23 18:25:08 CEST 2015


> On 23 Apr 2015, at 15:37, Peter Balsianok <balsianok.peter at gmail.com> wrote:
> 
> Sorry, but no.
> 
> (0)     update request {
> (0)       Tmp-Octets-0 := 0x01020304
> (0)     } # update request = noop
> (0) log_request: EXPAND /app_log/radius/auth/radius.log
> (0) log_request:    --> /app_log/radius/auth/radius.log
> (0) log_request: EXPAND %t %{Tmp-Octets-0} foo
> (0) log_request:    --> Thu Apr 23 16:34:57 2015 0x01020304 foo
> 
> radius.log:
> Thu Apr 23 16:34:57 2015 0x01020304 foo

No, it would be:

update request {
	Tmp-Octets-0 := "%t \001\002\003\004"
}

linelog {
	format = &Tmp-Octets-0
}

But only v3.1.x linelog allows the use of templates as format strings in linelog.

The reason why using octal escape sequences in the format string doesn't work, is because the escape function that's used, converts them back to the octal representation.

So they go octal -> binary -> octal.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150423/4816c278/attachment-0001.sig>


More information about the Freeradius-Users mailing list