Hello!

In transitioning from isakmpd.conf to ipsec.conf I want to make the
configuration file simple and readable by using macros.
However, I seems like I can not make use of macros in the way that I want.
Example:
host_a="192.168.1.1"
host_b="192.168.2.2"
host_list="{" $host_a $host_b "}"
host_a_copy=$host_a
list_copy=$host_list

Gives errors:
# ipsecctl -vnf ipsec_hosts.conf
ipsec_hosts.conf: 5: syntax error
ipsecctl: Syntax error in config file: ipsec rules not loaded
host_a = "192.168.1.1"
host_b = "192.168.2.2"
host_list = "{ 192.168.1.1 192.168.2.2 }"
host_a_copy = "192.168.1.1"

It gives me even more problem when I use macros with lists of networks:
network_a="192.168.1.0/24"
network_b="192.168.2.0/24"
network_a_copy=$network_a
network_list="{ 192.168.1.0/24 192.168.2.0/24 }"
network_list_copy=$network_list
network_list_1="{" $network_a $network_b "}"
network_list_1_copy=$network_list_1

# ipsecctl -vnf ipsec_networks.conf
ipsec_networks.conf: 3: syntax error
ipsec_networks.conf: 5: syntax error
ipsec_networks.conf: 6: syntax error
ipsec_networks.conf: 7: macro 'network_list_1' not defined
ipsec_networks.conf: 7: syntax error
ipsecctl: Syntax error in config file: ipsec rules not loaded
network_a = "192.168.1.0/24"
network_b = "192.168.2.0/24"
network_list = "{ 192.168.1.0/24 192.168.2.0/24 }"

Is is supposed to work, or is it a bug? Or is there another way of doing it,
am I doing it wrong?

Thank you,

Jakob Alvermark
jakob.alverm...@bsdlabs.com
BSDLabs AB
Solna, Sweden
556759-7652

Reply via email to