]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixup references to Pool-Range
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 29 Nov 2020 20:54:18 +0000 (13:54 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 29 Nov 2020 20:54:18 +0000 (13:54 -0700)
doc/antora/modules/raddb/pages/mods-available/redis_ippool.adoc
raddb/mods-available/redis_ippool
src/modules/rlm_redis_ippool/rlm_redis_ippool.c
src/tests/modules/redis_ippool/alloc.unlang
src/tests/modules/redis_ippool/module.conf
src/tests/modules/redis_ippool/update.unlang

index 74f8cd70aecc1273eb9cbf499405801650a136cc..a383d68421dc65b3eaaa7cf886312bb1dbdc3fe6 100644 (file)
@@ -78,9 +78,9 @@ allocated_address_attr:: List and attribute where the allocated address is writt
 
 
 
-range_attr:: List and attribute where the `Pool-Range` ID (if set) is written to.
+range_attr:: List and attribute where the `IP-Pool.Range` ID (if set) is written to.
 
-The idea of the `Pool-Range` is that it provides a key into other datastores
+The idea of the `IP-Pool.Range` is that it provides a key into other datastores
 or caches, which store the additional options associated with the range an
 IP address belongs to.
 
@@ -126,7 +126,7 @@ redis_ippool {
        requested_address = "%{%{Requested-IP-Address}:-%{DHCP-Client-IP-Address}}"
 #      ipv4_integer = yes
        allocated_address_attr = &reply.DHCP-Your-IP-Address
-       range_attr = &reply.Pool-Range
+       range_attr = &reply.IP-Pool.Range
        expiry_attr = &reply.DHCP-IP-Address-Lease-Time
        copy_on_update = yes
        redis {
index 1b079b82dfe57a763202aefd7f5b087ac09943d3..f5f26c34e15ae52fffa13b738fc00db7f7bdd5b3 100644 (file)
@@ -116,16 +116,16 @@ redis_ippool {
        allocated_address_attr = &reply.DHCP-Your-IP-Address
 
        #
-       #  range_attr:: List and attribute where the `Pool-Range` ID (if set) is written to.
+       #  range_attr:: List and attribute where the `IP-Pool.Range` ID (if set) is written to.
        #
-       #  The idea of the `Pool-Range` is that it provides a key into other datastores
+       #  The idea of the `IP-Pool.Range` is that it provides a key into other datastores
        #  or caches, which store the additional options associated with the range an
        #  IP address belongs to.
        #
        #  There may be multiple ranges of IP address contained within any given pool,
        #  which is why this is provided in addition to the pool name.
        #
-       range_attr = &reply.Pool-Range
+       range_attr = &reply.IP-Pool.Range
 
        #
        #  expiry_attr:: If set - the list and attribute to write the remaining lease time to.
index 506d97069362b42ecda2bc4f53e63336304002ab..7e17c1965e92ca94fbfb8ffd5ae32d34a2ff416c 100644 (file)
@@ -125,7 +125,7 @@ static CONF_PARSER module_config[] = {
        { FR_CONF_OFFSET("allocated_address_attr", FR_TYPE_TMPL | FR_TYPE_ATTRIBUTE | FR_TYPE_REQUIRED, rlm_redis_ippool_t, allocated_address_attr), .dflt = "&reply.DHCP-Your-IP-Address", .quote = T_BARE_WORD },
        { FR_CONF_DEPRECATED("reply_attr", FR_TYPE_TMPL | FR_TYPE_ATTRIBUTE | FR_TYPE_REQUIRED, rlm_redis_ippool_t, NULL) },
 
-       { FR_CONF_OFFSET("range_attr", FR_TYPE_TMPL | FR_TYPE_ATTRIBUTE | FR_TYPE_REQUIRED, rlm_redis_ippool_t, range_attr), .dflt = "&reply.Pool-Range", .quote = T_BARE_WORD },
+       { FR_CONF_OFFSET("range_attr", FR_TYPE_TMPL | FR_TYPE_ATTRIBUTE | FR_TYPE_REQUIRED, rlm_redis_ippool_t, range_attr), .dflt = "&reply.IP-Pool.Range", .quote = T_BARE_WORD },
        { FR_CONF_OFFSET("expiry_attr", FR_TYPE_TMPL | FR_TYPE_ATTRIBUTE, rlm_redis_ippool_t, expiry_attr) },
 
        { FR_CONF_OFFSET("ipv4_integer", FR_TYPE_BOOL, rlm_redis_ippool_t, ipv4_integer) },
index c6537ff4ac2a887fed6a136922cb2ac4061e0322..73e7c7d7412a294ba8a237538f8f13ba0830062c 100644 (file)
@@ -70,7 +70,7 @@ if ("%{redis:HGET {%{control.IP-Pool.Name}%}:ip:%{reply.Framed-IP-Address} range
        test_fail
 }
 
-if (&reply.Pool-Range == '192.168.0.0') {
+if (&reply.IP-Pool.Range == '192.168.0.0') {
        test_pass
 } else {
        test_fail
@@ -95,7 +95,7 @@ if (&reply.Session-Timeout == 30) {
 }
 
 update {
-       &request.Pool-Range := &reply.Pool-Range
+       &request.IP-Pool.Range := &reply.IP-Pool.Range
        &request.Framed-IP-Address := &reply.Framed-IP-Address
        &request.Session-Timeout := &reply.Session-Timeout # We should get the same lease time
        &reply !* ANY
@@ -121,7 +121,7 @@ if (updated) {
 #
 #  Check the ranges are the same
 #
-if (&request.Pool-Range == &reply.Pool-Range) {
+if (&request.IP-Pool.Range == &reply.IP-Pool.Range) {
        test_pass
 } else {
        test_fail
index 1df0071de9f0b96adcdfbfb766c529376aedddd7..0ce3b8c9c8992ed14471fe91fbc90797cc1cd508 100644 (file)
@@ -17,7 +17,7 @@ redis_ippool {
 
        requested_address = &Framed-IP-Address
        allocated_address_attr = &reply.Framed-IP-address
-       range_attr = &reply.Pool-Range
+       range_attr = &reply.IP-Pool.Range
        expiry_attr = &reply.Session-Timeout
 
        # This messes with the tests if enabled
index 36a44b80320277eb929d69b42e917246e43d7dc6..b1811c8f92c2f49f38790609a98346dd4eb955b5 100644 (file)
@@ -108,7 +108,7 @@ if ("%{redis:HGET {%{control.IP-Pool.Name}%}:ip:%{request.Framed-IP-Address} gat
 }
 
 # 13. and that the range attribute was set
-if (&reply.Pool-Range && (&reply.Pool-Range == '192.168.0.0')) {
+if (&reply.IP-Pool.Range && (&reply.IP-Pool.Range == '192.168.0.0')) {
        test_pass
 } else {
        test_fail