Before this commit, if a user configures multiple remotes in UCI,
each remote generates one output section of pools.
This doesn't hurt because swanctl just merges all of them,
but it is apparently not needed to have N copies of the same.
This commit changes the behavior to only create one pools
section at the end of the generated swanctl config.
Signed-off-by: Martin Pecka <peci1@seznam.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
fatal "AuthenticationMode $auth_mode not supported"
fi
- swanctl_xappend0 "pools {"
- config_list_foreach "$conf" pools config_pool
- swanctl_xappend0 "}"
-
swanctl_xappend0 ""
}
config_load ipsec
config_foreach config_ipsec ipsec
config_foreach config_remote remote
+
+ swanctl_xappend0 "pools {"
+ config_foreach config_pool pools
+ swanctl_xappend0 "}"
do_postamble
}