macros not working (syntax error) - possible bug?

From: Stefan Haller <stefan+freebsd_at_stha.de>
Date: Thu, 26 May 2022 14:35:03 UTC
Hi,

(After asking the same question on freebsd-questions@ I was encouraged
to ask here.)

When playing around with my pf.conf ruleset I came across the following
oddity:

If I define a macro in the following way:

> foo = "10.0.0.1"
> bar = "10.0.1.1"
> baz = "{" $foo $bar "}"

I can later use the macro $baz inside a filter rule.

However, if I store subnets in my macros it does not work. This can
easily be verify by having a file containing only the following three
lines and using `pfctl -nvf file`:

> foo = "10.0.0.0/24"
> bar = "10.0.1.0/24"
> baz = "{" $foo $bar "}"

I get:

> /tmp/test:3: syntax error

According to the section "macros" in pf.conf(5) the macro definition
looks legit. Could this be a bug in FreeBSD? Just wanted to ask the list
if I am missing something. I tested it on 13.1-RELEASE and CURRENT, I
always get a syntax error.

Best regards,
Stefan Haller