]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
notes on what needs fixing for new "auto-convert to edit"
authorAlan T. DeKok <aland@freeradius.org>
Wed, 16 Nov 2022 18:43:55 +0000 (13:43 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 17 Nov 2022 12:34:56 +0000 (07:34 -0500)
src/tests/keywords/update-attr-ref-null
src/tests/keywords/update-error-3
src/tests/keywords/update-filter
src/tests/keywords/update-group-error
src/tests/keywords/update-list-error
src/tests/keywords/update-list-null-rhs
src/tests/keywords/update-null-value-assign
src/tests/keywords/update-remove-index

index 7bae6f40ccd04d10f43f7740760b50b6a14d66ad..3df91574800de36553d2d827be45c656ffe28f31 100644 (file)
@@ -7,6 +7,11 @@ update request {
        &Tmp-String-0 += 'foo'
        &Tmp-String-0 += 'bar'
        &Tmp-String-1 += 'baz'
+
+       #
+       #  @fixme - EDIT - There's already a list!  WTF is going on here?
+       #  this should be forbidden!
+       #
        &control !* ANY
 }
 
@@ -19,6 +24,9 @@ if (&Tmp-String-0[0] != 'foo') {
 }
 
 # Delete an attribute by assigning a non-existent attribute to it
+#
+#  @fixme - EDIT - the new method is to simply omit the assignment
+#
 update {
        &Tmp-String-0[1] := &Reply-Message
 }
index b413b5657ee78c7e0528b7958972c8ff8aaa9860..7591e2ae1172e9a393f2655fe80ecd1b10e59cc3 100644 (file)
@@ -4,6 +4,10 @@
 #  It's an error to assign literal values which are not
 #  part of the set of enumerated values for an attribute
 #
+
+#
+#  @fixme - EDIT - this is now a run-time error
+#
 update {
        &Service-Type := 'hello'        # ERROR
 }
index 5455fbe767a1632c5be0b5e768623d1b09d6ca99..fbf41659bc685344fb05de6b3a08f54c72bf675e 100644 (file)
@@ -14,9 +14,18 @@ update control {
 # Reset the request list
 update {
        &request !* ANY
+
+       #
+       #  @fixme - EDIT - &control[*] isn't supported, and is ignored.  It should likely
+       #  be a compile-time error?
+       #
        &request += &control[*]
 }
 
+#
+#  @fixme - EDIT - all kinds of other things are broken, and no time currently to debug them.
+#
+
 debug_request
 
 #
index c76d11f0fac3e41aa6a6fb5f0f7eb8611208f915..5ca4cc111606315b371b99e8fc2e1cb3063b4f6f 100644 (file)
@@ -7,6 +7,8 @@ update reply {
        #
        #  This is a string, so it's NOT allowed.
        #
+       #  @fixme - EDIT - the error is now on the first line
+       #
        &Tmp-String-1 := {
                Tmp-String-2 := "1.0" # ERROR
        }
index 5eb26ee7a4126f669b275f93fadfe6d6b87af624..0f96c421a0c470af1dbf91fd5b42129d60e20f46 100644 (file)
@@ -5,7 +5,7 @@
 #
 update {
        &request := &reply
-       &config += &request
+       &control += &request
        &reply !* ANY
 }
 
@@ -13,7 +13,9 @@ update {
        &reply += `/path/to/foo bar baz`
 }
 
-
+#
+#  @fixme - EDIT - this is now a run-time error :(
+#
 update {
        &request := nope                # ERROR
 }
index 05f95525b152db22bcaf629dd4b664b445080d71..ad0c56587b3ae8c2f40f2ab83c31103689d9b5a7 100644 (file)
@@ -7,6 +7,10 @@ update request {
        &Tmp-String-0 += 'foo'
        &Tmp-String-0 += 'bar'
        &Tmp-String-1 += 'baz'
+
+       #
+       #  @fixme - EDIT - how the heck did this ever work?
+       #
        &control !* ANY
 }
 
index 4647e6d7955cd893c18704361a40e5b039152834..5e0f1780b19d309c96305c2ed16aef90521cc29d 100644 (file)
@@ -16,6 +16,8 @@ if (&Tmp-Integer-0) {
 #
 #  NULL valued strings get converted to empty length strings
 #
+#  @fixme - EDIT - the new method is to simply omit the assignment
+#
 update request {
        &Tmp-String-0 := "%{Reply-Message}"
 }
@@ -29,6 +31,8 @@ if (&Tmp-String-0 != '') {
 #
 #  NULL valued octet strings get converted to zero length octets strings?!
 #
+#  @fixme - EDIT - the new method is to simply omit the assignment
+#
 update request {
        &Tmp-Octets-0 := "%{Reply-Message}"
 }
index 67748c12ce4a1dce9dea478ec09d49115a94d9e8..cb0386f8feaa8b6ef10c5b9cb4166ecea81e18cb 100644 (file)
@@ -14,6 +14,11 @@ update {
 
 debug_request
 
+#
+#  @fixme - EDIT - we should not be allowed to remove by both
+#  index AND value.  Or, we should... and the edit code needs
+#  to be updated.
+#
 update request {
        &Tmp-IP-Address-0[3] -= 192.0.2.2
 }