From: Alan T. DeKok Date: Fri, 20 Jan 2017 22:59:06 +0000 (-0500) Subject: Using "Attr-X" means that the RHS should be hex X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae4c964eedc07e348ce1ec1511671b68405f549c;p=thirdparty%2Ffreeradius-server.git Using "Attr-X" means that the RHS should be hex and not ipaddr, or other data types --- diff --git a/src/tests/keywords/unknown b/src/tests/keywords/unknown index eb9659123ae..739be6fb7d2 100644 --- a/src/tests/keywords/unknown +++ b/src/tests/keywords/unknown @@ -56,7 +56,7 @@ if (&Vendor-11344-Attr-1 != 127.0.0.2) { } update request { - &Vendor-11344-Attr-1 := 127.0.0.1 + &Vendor-11344-Attr-1 := 0x7f000001 } if (&FreeRADIUS-Proxied-To == 127.0.0.2) { diff --git a/src/tests/unit/condition.txt b/src/tests/unit/condition.txt index 5c9f405831f..c0c095c4876 100644 --- a/src/tests/unit/condition.txt +++ b/src/tests/unit/condition.txt @@ -524,11 +524,11 @@ data &WiMAX-PFDv2-Src-Port == 6809 # # This OID is known, but the data is malformed. -# This is disallowed. Fix the configuration so that -# it works. +# Allow it so that we can look for malformed attributes +# in packets. # condition &Attr-26.24757.84.9.5.7 == 0x1a99 -data ERROR offset 27 Failed to parse value for attribute +data &Attr-26.24757.84.9.5.7 == 0x1a99 # This one is really unknown condition &Attr-26.24757.84.9.5.15 == 0x1a99 @@ -617,13 +617,13 @@ data false # # 'Unknown' attributes which are defined in the main dictionary # should be resolved to their real names. -condition &Attr-1 == 'bar' -data &User-Name == 'bar' +condition &Attr-1 == 0x616263 +data &User-Name == 'abc' -condition &Vendor-11344-Attr-1 == 127.0.0.1 +condition &Vendor-11344-Attr-1 == 0x7f000001 data &FreeRADIUS-Proxied-To == 127.0.0.1 -condition &FreeRADIUS-Attr-1 == 127.0.0.1 +condition &FreeRADIUS-Attr-1 == 0x7f000001 data &FreeRADIUS-Proxied-To == 127.0.0.1 #