aboutsummaryrefslogtreecommitdiffstats
path: root/src/manager
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-11-17 23:08:16 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-11-17 23:08:16 +0000
commit3a19f38d15600df7ab12c8802079caf206e87846 (patch)
tree854a99ea662474a3fd7ccd57860b4fc5088b186f /src/manager
parentb3b379e0440a9bebed126326a367d6563cb2d562 (diff)
downloadstrongswan-3a19f38d15600df7ab12c8802079caf206e87846.tar.bz2
strongswan-3a19f38d15600df7ab12c8802079caf206e87846.tar.xz
handle right=%any case in strongSwan manager
Diffstat (limited to 'src/manager')
-rw-r--r--src/manager/controller/config_controller.c4
-rw-r--r--src/manager/templates/config/list.cs18
2 files changed, 16 insertions, 6 deletions
diff --git a/src/manager/controller/config_controller.c b/src/manager/controller/config_controller.c
index c5c96a070..e7941ada4 100644
--- a/src/manager/controller/config_controller.c
+++ b/src/manager/controller/config_controller.c
@@ -70,6 +70,10 @@ static void process_peerconfig(private_config_controller_t *this,
{
if (streq(name, "local") || streq(name, "remote"))
{
+ if (streq(value, "0.0.0.0") || streq(value, "::"))
+ {
+ value = "%any";
+ }
r->setf(r, "peercfgs.%s.ikecfg.%s=%s", config, name, value);
}
}
diff --git a/src/manager/templates/config/list.cs b/src/manager/templates/config/list.cs
index f944bd6c5..0a3dbd4cb 100644
--- a/src/manager/templates/config/list.cs
+++ b/src/manager/templates/config/list.cs
@@ -6,9 +6,13 @@
<span><?cs var:peercfg.remote ?></span>
</h1>
<div class="controls">
- <a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
- <img src="<?cs var:base ?>/static/initiate.png"/>
- </a>
+ <?cs if:peercfg.remote != "%any" ?>
+ <a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
+ <img src="<?cs var:base ?>/static/initiate.png"/>
+ </a>
+ <?cs else ?>
+ &nbsp;
+ <?cs /if ?>
</div>
<div class="expander">
<hr/>
@@ -17,9 +21,11 @@
<div class="expand">
<h1><?cs name:childcfg ?>:</h1>
<div class="controls">
- <a title="initiate SA" href="<?cs var:base ?>/control/initiatechild/<?cs name:childcfg ?>">
- <img src="<?cs var:base ?>/static/initiate.png"/>
- </a>
+ <?cs if:peercfg.remote != "%any" ?>
+ <a title="initiate SA" href="<?cs var:base ?>/control/initiatechild/<?cs name:childcfg ?>">
+ <img src="<?cs var:base ?>/static/initiate.png"/>
+ </a>
+ <?cs /if ?>
</div>
<div class="expander">
<table>