Quantcast

lists of lists

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

lists of lists

Admin Lewis
Hi, I am new to the list and to the openbsd/pf world.
I have a simple question. Can I use lists of lists on pf.conf configuration file ?
For example:

my_macro1=192.168.1.1
my_macro2=192.168.1.2
my_list1="{ 192.168.1.3 192.168.1.4 }"
my_list2="{ 192.168.1.5 192.168.1.6 }"

my_list_of_lists="{" $my_macro1 $my_macro2 $my_list1 $my_list2 "}"

Thank you.
Lewis


--
Linux Server, Microsoft Windows 2003/2008 Server, Exchange 2007
http://predellino.blogspot.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: lists of lists

Kenneth Gober
On Tue, Mar 21, 2017 at 12:11 PM, Admin Lewis <[hidden email]> wrote:
> I have a simple question. Can I use lists of lists on pf.conf configuration
> file ?
>
> my_macro1=192.168.1.1
> my_macro2=192.168.1.2
> my_list1="{ 192.168.1.3 192.168.1.4 }"
> my_list2="{ 192.168.1.5 192.168.1.6 }"
>
> my_list_of_lists="{" $my_macro1 $my_macro2 $my_list1 $my_list2 "}"

This should work:

my_macro1=192.168.1.1
my_macro2=192.168.1.2
my_list1="192.168.1.3 192.168.1.4"
my_list2="192.168.1.5 192.168.1.6"
my_list_of_lists="{" $my_macro1 $my_macro2 $my_list1 $my_list2 "}"

This avoids nesting the curly braces, which makes the result simply a list
rather than a list of lists.

-ken
Loading...