diff options
author | Ermal <eri@pfsense.org> | 2013-01-30 13:47:21 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-30 13:47:21 +0000 |
commit | 5ee79d322a70127025e51241c6092c1e7db74981 (patch) | |
tree | 6c81dd6f565321309a5516e53db2e385597e2639 | |
parent | b9688d6445ca034ebba80d8c53e4c195e2f76fcb (diff) | |
download | pfsense-5ee79d322a70127025e51241c6092c1e7db74981.zip pfsense-5ee79d322a70127025e51241c6092c1e7db74981.tar.gz |
Correct fetching ipv4 gateway by passing correct parameter
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index f6a3122..a666387 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3107,7 +3107,6 @@ function interface_6rd_configure($interface = "wan") { $wanif = get_real_interface($interface); $ip4address = find_interface_ip($wanif); - $ip4gateway = get_interface_gateway($wanif); if ((!is_ipaddrv4($ip4address)) || (is_private_ip($ip4address))) { log_error("The interface IPv4 '{$ip4address}' address on interface '{$wanif}' is not public, not configuring 6RD tunnel"); return false; @@ -3161,6 +3160,7 @@ function interface_6rd_configure($interface = "wan") { file_put_contents("{$g['tmp_path']}/{$wanif}_routerv6", "{$rd6brgw}\n"); file_put_contents("{$g['tmp_path']}/{$wanif}_defaultgwv6", "{$rd6brgw}\n"); + $ip4gateway = get_interface_gateway($interface); if (is_ipaddrv4($ip4gateway)) mwexec("/sbin/route change -host " . $wancfg['gateway-6rd'] . " {$ip4gateway}"); @@ -3185,14 +3185,12 @@ function interface_6to4_configure($interface = "wan"){ * with a public IPv4 address on the interface */ $wancfg = $config['interfaces'][$interface]; - $wanif = $wancfg['if']; if (empty($wancfg)) $wancfg = array(); $wanif = get_real_interface($interface); $ip4address = find_interface_ip($wanif); - $ip4gateway = get_interface_gateway($wanif); if((!is_ipaddrv4($ip4address)) || (is_private_ip($ip4address))) { log_error("The interface IPv4 '{$ip4address}' address on interface '{$wanif}' is not public, not configuring 6RD tunnel"); return false; @@ -3265,9 +3263,9 @@ function interface_6to4_configure($interface = "wan"){ file_put_contents("{$g['tmp_path']}/{$wanif}_routerv6", "{$stfbrgw}"); file_put_contents("{$g['tmp_path']}/{$wanif}_defaultgwv6", "{$stfbrgw}"); - if (is_ipaddrv4($ip4gateway)) { + $ip4gateway = get_interface_gateway($interface); + if (is_ipaddrv4($ip4gateway)) mwexec("route change -host 192.88.99.1 {$ip4gateway}"); - } if (!$g['booting']) { /* configure dependent interfaces */ |