From: Mark W. <ri...@us...> - 2002-04-21 19:17:40
|
Update of /cvsroot/ipcop/ipcop/html/cgi-bin/vpn.cgi In directory usw-pr-cvs1:/tmp/cvs-serv26455/html/cgi-bin/vpn.cgi Modified Files: Tag: IPCOP_v0_1 vpnconfig.dat Log Message: Several fixes Index: vpnconfig.dat =================================================================== RCS file: /cvsroot/ipcop/ipcop/html/cgi-bin/vpn.cgi/Attic/vpnconfig.dat,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.4 diff -C2 -d -r1.3.2.3 -r1.3.2.4 *** vpnconfig.dat 25 Mar 2002 14:10:19 -0000 1.3.2.3 --- vpnconfig.dat 21 Apr 2002 19:17:28 -0000 1.3.2.4 *************** *** 20,23 **** --- 20,24 ---- $cgiparams{'ENABLED'} = 'off'; + $cgiparams{'COMPRESSION'} = 'off'; # wantfile required for import, sadly it can only be enabled globally... &getcgihash(\%cgiparams, {'wantfile' => 1, 'filevar' => 'FH'}); *************** *** 31,35 **** unless (&validip($cgiparams{'LEFT'})) { $errormessage = $tr{'left ip is invalid'}; } ! unless (&validip($cgiparams{'LEFTNEXTHOP'})) { $errormessage = $tr{'left next hop ip is invalid'}; } unless (&validipandmask($cgiparams{'LEFT_SUBNET'})) { --- 32,37 ---- unless (&validip($cgiparams{'LEFT'})) { $errormessage = $tr{'left ip is invalid'}; } ! unless (&validip($cgiparams{'LEFTNEXTHOP'}) || ! $cgiparams{'LEFTNEXTHOP'} == "%defaultroute") { $errormessage = $tr{'left next hop ip is invalid'}; } unless (&validipandmask($cgiparams{'LEFT_SUBNET'})) { *************** *** 37,41 **** unless (&validip($cgiparams{'RIGHT'})) { $errormessage = $tr{'right ip is invalid'}; } ! unless (&validip($cgiparams{'RIGHTNEXTHOP'})) { $errormessage = $tr{'right next hop ip is invalid'}; } unless (&validipandmask($cgiparams{'RIGHT_SUBNET'})) { --- 39,44 ---- unless (&validip($cgiparams{'RIGHT'})) { $errormessage = $tr{'right ip is invalid'}; } ! unless (&validip($cgiparams{'RIGHTNEXTHOP'}) || ! $cgiparams{'RIGHTNEXTHOP'} == "%defaultroute") { $errormessage = $tr{'right next hop ip is invalid'}; } unless (&validipandmask($cgiparams{'RIGHT_SUBNET'})) { *************** *** 128,134 **** { $cgiparams{'ENABLED'} = 'on'; - } - if ($cgiparams{'ACTION'} eq '') - { $cgiparams{'COMPRESSION'} = 'off'; } --- 131,134 ---- *************** *** 325,347 **** $conn{'RIGHT_SUBNET'} = $temp[6]; $conn{'SECRET'} = $temp[7]; ! $conn{'COMPRESS'} = $temp[9]; print SECRETS "$conn{'LEFT'} $conn{'RIGHT'} : PSK \"$conn{'SECRET'}\"\n"; ! print CONF "conn $conn{'NAME'}\n"; ! print CONF "\tleft=$conn{'LEFT'}\n"; ! if ($conn{'COMPRESS'} == 'on') { ! print CONF "\tcompress=yes\n"; ! } else { ! print CONF "\tcompress=no\n"; } - print CONF "\tleftsubnet=$conn{'LEFT_SUBNET'}\n"; - print CONF "\tleftnexthop=$conn{'LEFTNEXTHOP'}\n"; - print CONF "\tright=$conn{'RIGHT'}\n"; - print CONF "\trightsubnet=$conn{'RIGHT_SUBNET'}\n"; - print CONF "\trightnexthop=$conn{'RIGHTNEXTHOP'}\n"; - print CONF "\tauto=add\n"; - print CONF "\n"; - $id++; } --- 325,349 ---- $conn{'RIGHT_SUBNET'} = $temp[6]; $conn{'SECRET'} = $temp[7]; ! $conn{'ENABLED'} = $temp[8]; ! $conn{'COMPRESSION'} = $temp[9]; print SECRETS "$conn{'LEFT'} $conn{'RIGHT'} : PSK \"$conn{'SECRET'}\"\n"; ! if ($conn{'ENABLED'} eq 'on') { ! print CONF "conn $conn{'NAME'}\n"; ! print CONF "\tleft=$conn{'LEFT'}\n"; ! if ($conn{'COMPRESSION'} eq 'on') { ! print CONF "\tcompress=yes\n"; ! } else { ! print CONF "\tcompress=no\n"; ! } ! print CONF "\tleftsubnet=$conn{'LEFT_SUBNET'}\n"; ! print CONF "\tleftnexthop=$conn{'LEFTNEXTHOP'}\n"; ! print CONF "\tright=$conn{'RIGHT'}\n"; ! print CONF "\trightsubnet=$conn{'RIGHT_SUBNET'}\n"; ! print CONF "\trightnexthop=$conn{'RIGHTNEXTHOP'}\n"; ! print CONF "\tauto=add\n"; ! print CONF "\n"; } $id++; } |