summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-07-25 21:10:47 +0000
committerErmal <eri@pfsense.org>2011-07-25 21:10:47 +0000
commit320bba6494cf42e6cec3ef9ee7635f528a9e62c6 (patch)
tree133fc6836f828f7acee423b0ae20ea54507991b6 /etc/inc/vpn.inc
parent6390cdac26862ed5494106797ea9e7a876fdea43 (diff)
downloadpfsense-320bba6494cf42e6cec3ef9ee7635f528a9e62c6.zip
pfsense-320bba6494cf42e6cec3ef9ee7635f528a9e62c6.tar.gz
Always send the route delete command even if it fails its ok. This avoids having to dump the routing table.
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc13
1 files changed, 3 insertions, 10 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 7434f10..921743f 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -35,7 +35,7 @@
/*
pfSense_BUILDER_BINARIES: /usr/bin/killall /usr/local/sbin/sasyncd /sbin/ifconfig /sbin/sysctl
- pfSense_BUILDER_BINARIES: /usr/local/sbin/setkey /usr/bin/netstat /sbin/route /bin/mkdir
+ pfSense_BUILDER_BINARIES: /usr/local/sbin/setkey /sbin/route /bin/mkdir
pfSense_BUILDER_BINARIES: /usr/local/sbin/racoonctl /usr/local/sbin/racoon
pfSense_BUILDER_BINARIES: /usr/local/sbin/filterdns /usr/local/sbin/mpd4
pfSense_MODULE: vpn
@@ -126,10 +126,6 @@ function vpn_ipsec_configure($ipchg = false)
/* fastforwarding is not compatible with ipsec tunnels */
mwexec("/sbin/sysctl net.inet.ip.fastforwarding=0");
- /* this loads a route table which is used to determine if a route needs to be removed. */
- exec("/usr/bin/netstat -rnf inet", $route_arr, $retval);
- $route_str = implode("\n", $route_arr);
-
/* resolve all local, peer addresses and setup pings */
$ipmap = array();
$rgmap = array();
@@ -898,11 +894,8 @@ EOD;
}
}
}
- } elseif(is_ipaddr($rgip)) {
- if(stristr($route_str, "{$rgip}")) {
- mwexec("/sbin/route delete -host {$rgip}", true);
- }
- }
+ } else if(is_ipaddr($rgip))
+ mwexec("/sbin/route delete -host {$rgip}", true);
}
fwrite($fd, $spdconf);
OpenPOWER on IntegriCloud