]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Conf: Fix invalid check in text_or_ipa grammar
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 6 May 2025 12:50:53 +0000 (14:50 +0200)
committerMaria Matejka <mq@ucw.cz>
Sat, 10 May 2025 17:54:27 +0000 (19:54 +0200)
Can cause crash when a bad expression is used.

conf/confbase.Y

index 86ae099c9744217551d94b4d9d3301e61c482fd3..20e6b02aa4e61663af5de682bec7f3589cffd0f7 100644 (file)
@@ -461,8 +461,8 @@ text_or_ipa:
    }
  | '(' term ')' {
      $$ = *cf_eval($2, T_VOID);
-     if (($$.type != T_BYTESTRING) && ($$.type != T_STRING))
-       cf_error("Bytestring or string value expected");
+     if (($$.type != T_STRING) && ($$.type != T_IP))
+       cf_error("String or IP value expected");
    }
  ;