From 9bf114ff0a8a95f07136e46f2bed016e87fcec50 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 13 Mar 2009 04:25:14 +0100 Subject: [PATCH] Make sure the DPD interval makes it into the configuration. Also make sure it is numeric --- usr/local/www/vpn_ipsec_edit.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php index 13a93f2c23..fffd21dbf8 100755 --- a/usr/local/www/vpn_ipsec_edit.php +++ b/usr/local/www/vpn_ipsec_edit.php @@ -63,6 +63,7 @@ if (isset($id) && $a_ipsec[$id]) { list($pconfig['remotenet'],$pconfig['remotebits']) = explode("/", $a_ipsec[$id]['remote-subnet']); $pconfig['remotegw'] = $a_ipsec[$id]['remote-gateway']; + $pconfig['dpddelay'] = $a_ipsec[$id]['dpddelay']; $pconfig['p1mode'] = $a_ipsec[$id]['p1']['mode']; @@ -156,6 +157,9 @@ if ($_POST) { $input_errors[] = "A valid local network bit count must be specified."; } } + if (($_POST['dpddelay'] && !is_numeric($_POST['dpddelay']))) { + $input_errors[] = "The DPD interval delay must be an integer."; + } if (($_POST['p1lifetime'] && !is_numeric($_POST['p1lifetime']))) { $input_errors[] = "The P1 lifetime must be an integer."; } @@ -232,6 +236,7 @@ if ($_POST) { } $ipsecent['remote-gateway'] = $_POST['remotegw']; + $ipsecent['dpddelay'] = $_POST['dpddelay']; $ipsecent['p1']['mode'] = $_POST['p1mode']; $ipsecent['p1']['myident'] = array(); @@ -658,4 +663,4 @@ function address_to_pconfig_vpn($adr, &$padr, &$pmask) { } } -?> \ No newline at end of file +?>