Is it possible to use a macro variable with a network CIDR value and then
reference it later in a list?
E.g. This first example is fine:
a = “1.2.3.4”
b = “2.3.4.5”
c = “{“ $a $b “}”
works as expected, that is c ends up as a list with host values:
c = "{ 1.2.3.4 2.3.4.5 }”
But if one uses the CIDR network format for any one of the variables, a syntax
error is created:
an = “1.2.3.0/24”
bn = “2.3.0.0/16”
cn = “{“ $an $bn “}”
Output from pfctl -nvf /etc/pf.conf:
a = "1.2.3.4"
b = "2.3.4.5"
c = "{ 1.2.3.4 2.3.4.5 }"
an = "1.2.3.0/24"
bn = "2.3.0.0/16"
/etc/pf.conf:36: syntax error
—
Russell Sutherland
Supervisor, Network Development | Enterprise Infrastructure Solutions
Information Technology Services | University of Toronto
4 Bancroft Ave., Rm. 102 | Toronto, ON M5S 1C1
[email protected]
+1.416.978.0470 ~ tel
+1.416.978.6620 ~ fax