allowing multiple values through the attribute filter
hi, i've got a remote site that we want to trust a few return attributes from.... no problem. configured. however, there are 2 different attribute values for one of the attributes and i'm not quite sure of the syntax available for use....eg realm.com Session-Timeout <= 28800, Idle-Timeout <= 600, Tunnel-Medium-Type == IEEE-802, Tunnel-Type == VLAN, Tunnel-Private-Group-Id == testvlan this works...and allows ONLY 'testvlan' attribute to be returned but I also need to accept 'othervlan' and a structure of Tunnel-Private-Group-Id =~ ( /^testvlan$/ || /^othervlan$/ ) doesnt do what i need. is this do-able in attribute filter or can I construct something in unlang (this is a 2.0.0pre2 server) thanks alan PS I've tried setting 2 values...as per the Framed-Protocol == PPP, Framed-Protocol == SLIP, part.....eg Tunnel-Private-Group-Id == testvlan, Tunnel-Private-Group-Id == othervlan, but that just stops EITHER of the return attributes from working. bug?
PS I've tried setting 2 values...as per the
Framed-Protocol == PPP, Framed-Protocol == SLIP,
part.....eg
Tunnel-Private-Group-Id == testvlan, Tunnel-Private-Group-Id == othervlan,
but that just stops EITHER of the return attributes from working. bug?
From what I can see the code ANDs the filters for each attribute, and the comment implies this is intentional; presumably for constructs such as:
Session-Timeout >= 300, Session-Timeout <= 28800, Can you not do: Tunnel-Private-Group-Id =~ "^(testvlan|othervlan)$" ?
A.L.M.Buxey@lboro.ac.uk wrote:
realm.com Session-Timeout <= 28800, Idle-Timeout <= 600, Tunnel-Medium-Type == IEEE-802, Tunnel-Type == VLAN, Tunnel-Private-Group-Id == testvlan
this works...and allows ONLY 'testvlan' attribute to be returned but I also need to accept 'othervlan' and a structure of
Tunnel-Private-Group-Id =~ ( /^testvlan$/ || /^othervlan$/ )
doesnt do what i need. is this do-able in attribute filter or can I construct something in unlang (this is a 2.0.0pre2 server)
It's not doable in the attr_filter module, which is mostly a re-branded "users" file. It is possible in CVS head (not in the 2.0.0-pre2 release). See "man unlang" for filtering attributes. Although those filtering attributes SHOULD really be split into separate "permit" and "deny" sections, and shouldn't go into "update". Alan DeKok.
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Phil Mayers