Add IPCOMP (IP Compression) support to IPSEC VPN's

This commit is contained in:
Scott Ullrich 2005-01-25 21:32:40 +00:00
parent 6dfd800f50
commit 3da9a135d4
2 changed files with 13 additions and 1 deletions

View File

@ -1411,6 +1411,11 @@ EOD;
$lan_subnet = $config['interfaces']['lan']['subnet'];
$wan_ip = $config['interfaces']['wan']['ipaddr'];
$internal_subnet = gen_subnet($lan_ip, $lan_subnet) . "/" . $config['interfaces']['lan']['subnet'];
/* Is IP Compression enabled? */
if(isset($config['ipsec']['ipcomp'])
exec("/sbin/sysctl net.inet.ipcomp.ipcomp_enable=1");
else
exec("/sbin/sysctl net.inet.ipcomp.ipcomp_enable=0");
if(is_array($config['ipsec']['tunnel'])) {
foreach ($config['ipsec']['tunnel'] as $tunnel) {
$remote_gateway = $tunnel['remote-gateway'];

View File

@ -8,7 +8,7 @@
originally part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -41,6 +41,7 @@ $wancfg = &$config['interfaces']['wan'];
$pconfig['enable'] = isset($config['ipsec']['enable']);
$pconfig['preferredoldsa'] = isset($config['ipsec']['preferredoldsa']);
$pconfig['ipcomp'] = isset($config['ipsec']['ipcomp']);
if ($_POST) {
@ -58,6 +59,7 @@ if ($_POST) {
$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
$config['ipsec']['preferredoldsa'] = $_POST['preferredoldsa'] ? true : false;
$config['ipsec']['ipcomp'] = $_POST['ipcomp'] ? true : false;
write_config();
@ -124,6 +126,11 @@ if ($_GET['act'] == "del") {
<strong>Prefer newer SA's.<br>
</strong></p>
</td>
<td class="vtable"><p><span class="vexpl"> </span>
<input name="ipcomp" type="checkbox" id="ipcomp" value="yes" <?php if ($pconfig['ipcomp'] == "yes") echo "checked";?>>
<strong>Enable VPN IP Compression<br>
</strong></p>
</td>
</tr>
<tr>
<td> <input name="submit" type="submit" class="formbtn" value="Save">