]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if we can't parse a token, it must be an expression
authorAlan T. DeKok <aland@freeradius.org>
Sat, 21 Jan 2023 15:24:23 +0000 (10:24 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 21 Jan 2023 15:24:23 +0000 (10:24 -0500)
src/lib/server/cf_file.c

index 5a351f5980528a8f1233da8d7e71f1921bd1d0ab..280d8f5d21f39ebbfcc2424b72f0c0f63df7b6dd 100644 (file)
@@ -2418,19 +2418,17 @@ check_for_eol:
                 *      In most cases, this is just one word.  In some cases it's not.  So we peek ahead to see.
                 */
                if (cf_get_token(parent, &ptr2, &value_token, buff[2], stack->bufsize,
-                                frame->filename, frame->lineno) < 0) {
-                       return -1;
-               }
-               value = buff[2];
-
-               /*
-                *      The thing after the token is "end of line" in some format, so it's fine.
-                */
-               fr_skip_whitespace(ptr2);
-               if (terminal_end_line[(uint8_t) *ptr2]) {
-                       ptr = ptr2;
-                       goto alloc_pair;
-               }
+                                frame->filename, frame->lineno) == 0) {
+                       /*
+                        *      The thing after the token is "end of line" in some format, so it's fine.
+                        */
+                       fr_skip_whitespace(ptr2);
+                       if (terminal_end_line[(uint8_t) *ptr2]) {
+                               ptr = ptr2;
+                               value = buff[2];
+                               goto alloc_pair;
+                       }
+               } /* else it looks like an expression */
 
                /*
                 *      Otherwise we reparse the thing as an expression.