diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-08-22 16:14:24 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-08-22 16:14:53 -0300 |
commit | e89c3caf2c4e69e255d18c8a19d163b2d36490e0 (patch) | |
tree | bb4b614773ef94161d10a482cbff41e6bcb30ce1 | |
parent | 475aa21460483d9ef849601dab71743aa839fe88 (diff) | |
download | pfsense-e89c3caf2c4e69e255d18c8a19d163b2d36490e0.zip pfsense-e89c3caf2c4e69e255d18c8a19d163b2d36490e0.tar.gz |
Delete old route for remote gateway when its IP changes. It fixes #3155
-rw-r--r-- | etc/inc/vpn.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 180ac19..bf9e611 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1926,6 +1926,9 @@ function reload_tunnel_spd_policy($phase1, $phase2, $old_phase1, $old_phase2) { /* generate temporary spd.conf */ @file_put_contents($spdfile, $spdconf); unset($spdconf); + /* remove static route to old gw */ + if (is_ipaddr($old_gw)) + mwexec("/sbin/route delete {$old_gw}", true); return true; } |