Project

General

Profile

« Previous | Next » 

Revision 2574c922

Added by Seth Mos about 17 years ago

If the Interface is not WAN remove static route on change

View differences:

usr/local/www/vpn_ipsec_edit.php
239 239
		$ipsecent['interface'] = $pconfig['interface'];
240 240
		pconfig_to_address($ipsecent['local-subnet'], $_POST['localnet'], $_POST['localnetmask']);
241 241
		$ipsecent['remote-subnet'] = $_POST['remotenet'] . "/" . $_POST['remotebits'];
242
		/* if the remote gateway changed and the interface is not WAN then remove route */
243
		/* the vpn_ipsec_configure() handles adding the route */
244
		if($_POST['interface'] <> "wan") {
245
			if($ipsecent['remote-gateway'] <> $_POST['remotegw']) {
246
				mwexec("/sbin/route delete -host {$ipsecent['remote-gateway']}");
247
			}
248
		}
242 249
		$ipsecent['remote-gateway'] = $_POST['remotegw'];
243 250
		$ipsecent['p1']['mode'] = $_POST['p1mode'];
244 251

  
......
658 665
        }
659 666
}
660 667

  
661
?>
668
?>

Also available in: Unified diff