[prev in list] [next in list] [prev in thread] [next in thread]
List: freeradius-users
Subject: Re: Cisco-AVPair regex
From: Alan DeKok <aland () deployingradius ! com>
Date: 2018-02-26 12:14:24
Message-ID: 9A2DBE0E-B998-4FA5-951A-B9350B02C42A () deployingradius ! com
[Download RAW message or body]
On Feb 26, 2018, at 4:38 AM, Kylián Martin <kylianm@plzen.eu> wrote:
>
> > TBH, the simplest thing is to *not* use "foreach". I'd guess that the Cisco-
> > AVPair attributes come in the same order all the time. So you can just rely on
> > that. e.g.
> >
> > if (Cisco-AVPair[0] =~ /^dhcp-option=/) {
> > update request {
> > Tmp-Integer-0 := "%{unpack:&Cisco-AVPair[0] 12
> > integer}"
> > }
> > }
> >
> > That will get you the binary data (4 octets) into Tmp-Integer-0.
>
> Thank you Alan. It works. AVPs always come in the same order. The unpacked data \
> looks correctly. The last modest question yet - how the get the rest of the \
> attribute (string following the TLV binary code)?
Keep using %{unpack: ... }
Alan DeKok
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic