Hi chaps, I'm slightly confused with the different V2 semantics. I'm trying to truncate the Framed-IP-Address to the first three quads for a particular realm (somerealm below) when a particular attribute contains particular text: In pre V2, something like this would do the trick: somerealm Some-Attribute == "Some,text" Framed-IP-Address =~ "^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+", Framed-IP-Address := `%{1}`, Fall-Through = Yes What would the equivalent rule for V2 be? The above doesn't appear to do what I want. Steve
Steve Brown wrote:
Hi chaps,
I'm slightly confused with the different V2 semantics. I'm trying to truncate the Framed-IP-Address to the first three quads for a particular realm (somerealm below) when a particular attribute contains particular text:
You can't really do that. IP addresses have 4 octets... My $0.02 is to put the truncated value into a separate attribute, then add the final octet to that when you create the Framed-IP-Address.
What would the equivalent rule for V2 be? The above doesn't appear to do what I want.
Probably because v2 is pickier: a 3-octet IP address is not valid. Alan DeKok.
Hi Alan, Thanks for the details. On 16/05/11 16:03, Alan DeKok wrote:
the Framed-IP-Address to the first three quads for a particular realm
You can't really do that. IP addresses have 4 octets...
Yes I know, this is a proxy only and the home server has specifically requested we do this...
My $0.02 is to put the truncated value into a separate attribute, then add the final octet to that when you create the Framed-IP-Address.
Sure, but I actually _want_ to send only the first 3 octets... Is that even possible? Steve
On 16/05/11 20:19, Alan DeKok wrote:
You can set the fourth octet to zero. *Nothing* else is possible.
Gotcha, that makes sense. Actually, setting the fourth octet to zero would do just fine for what the home server wants it mangled for. What would be the syntax in V2 to do that? Steve
Steve Brown wrote:
Gotcha, that makes sense. Actually, setting the fourth octet to zero would do just fine for what the home server wants it mangled for. What would be the syntax in V2 to do that?
<sigh> My first response described how to do that. Or, you can read the documentation. See "man unlang" Alan DeKok.
participants (2)
-
Alan DeKok -
Steve Brown