]> 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)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 10 May 2025 13:32:02 +0000 (15:32 +0200)
Can cause crash when a bad expression is used.

conf/confbase.Y

index af64e3ff9cfdb45fa902745757fe1ed406ccaba4..85768970758f91ab2fc93498e2375d2362c76510 100644 (file)
@@ -426,8 +426,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");
    }
  ;