summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormaho <maho@maho-G31T-M3.(none)>2012-07-06 08:59:30 +0300
committermaho <maho@maho-G31T-M3.(none)>2012-07-06 08:59:30 +0300
commit86ed4ec3e1600dec88a7e9071cc204d7a2ed9b1d (patch)
treedf0ab3d06d011d8d33b49ad4a958542c41abedbc /etc
parent494c2ad9e1d7c5ae709c06dca76d321eaa990b34 (diff)
downloadpfsense-86ed4ec3e1600dec88a7e9071cc204d7a2ed9b1d.zip
pfsense-86ed4ec3e1600dec88a7e9071cc204d7a2ed9b1d.tar.gz
Fix system_routing_configure() function so it does not try to add static routes ipv6 subnets to ipv4 gateways or ipv4 subnets to ipv6 gateways while using aliases that includes both ipv4 and ipv6 subnets.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 65484f6..76cbc0e 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -470,10 +470,10 @@ function system_routing_configure($interface = "") {
if(preg_match("/^Null/i", $rtent['gateway']))
$blackhole = "-blackhole";
- if (is_ipaddr($gatewayip)) {
+ if (is_ipaddr($gatewayip) && ((is_ipaddrv6($gatewayip) && is_subnetv6($rtent['network'])) || (is_ipaddrv4($gatewayip) && is_subnetv4($rtent['network'])))) {
mwexec("/sbin/route change {$inetfamily} {$blackhole} " . escapeshellarg($rtent['network']) .
" " . escapeshellarg($gatewayip));
- } else if (!empty($interfacegw)) {
+ } else if (!empty($interfacegw) && ((is_ipaddrv6($gatewayip) && is_subnetv6($rtent['network'])) || (is_ipaddrv4($gatewayip) && is_subnetv4($rtent['network'])))) {
mwexec("/sbin/route change {$inetfamily} {$blackhole} " . escapeshellarg($rtent['network']) .
" -iface " . escapeshellarg($interfacegw));
}
OpenPOWER on IntegriCloud