char *type = "";
while (TRUE)
{
+ case ID_ANY:
+ type = "any";
+ break;
case ID_IPV4_ADDR:
type = "ipv4";
break;
xmlTextWriterWriteFormatString(writer, "%D", id);
break;
}
- case ID_ANY:
- xmlTextWriterWriteAttribute(writer, "type", "any");
- break;
default:
/* TODO: base64 keyid */
xmlTextWriterWriteAttribute(writer, "type", "keyid");
{
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);
}
}
<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 ?>
+
+ <?cs /if ?>
</div>
<div class="expander">
<hr/>
<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>