diff options
author | Ermal <eri@pfsense.org> | 2013-12-06 19:16:34 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-06 19:16:34 +0000 |
commit | 0c21eb70b6f830e2c1edc06597c2e0bd443ed855 (patch) | |
tree | 44ec1b7260627acf632391edb9814fb5eb5401f0 /etc/inc/vpn.inc | |
parent | 86c135def224d010ac057f283b3a02f9699cb91a (diff) | |
download | pfsense-0c21eb70b6f830e2c1edc06597c2e0bd443ed855.zip pfsense-0c21eb70b6f830e2c1edc06597c2e0bd443ed855.tar.gz |
Use _vip as identified for CARP vip IPs to allow easier upgrade code. This way only ipaliases on carp need to be upgraded.
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 6d31b50..4c12f30 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -905,6 +905,7 @@ EOD; } /* static route needed? */ + $vip = ""; if (is_ipaddr($ph1ent['interface'])) { $vip = find_virtual_ip_alias($ph1ent['interface']); $parentinterface = $vip['interface']; @@ -915,7 +916,10 @@ EOD; /* add endpoint routes to correct gateway on interface */ if (interface_has_gateway($parentinterface)) { $gatewayip = get_interface_gateway("$parentinterface"); - $interfaceip = get_interface_ip($parentinterface); + if (empty($vip)) + $interfaceip = get_interface_ip($parentinterface); + else + $interfaceip = $vip['subnet']; $subnet_bits = get_interface_subnet($parentinterface); $subnet_ip = gen_subnet("{$interfaceip}", "{$subnet_bits}"); /* if the remote gateway is in the local subnet, then don't add a route */ |