diff options
author | Ermal <eri@pfsense.org> | 2013-07-16 07:47:28 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-07-16 07:47:40 +0000 |
commit | 5128e0feb0f81c8cfa05a24370e250fcbe81a09e (patch) | |
tree | e0c89a3c7048acd08f8c4f099cb85092a149ee94 /etc | |
parent | cd577ebd10dacf5785e91ba57c2539b69bf8d5c7 (diff) | |
download | pfsense-5128e0feb0f81c8cfa05a24370e250fcbe81a09e.zip pfsense-5128e0feb0f81c8cfa05a24370e250fcbe81a09e.tar.gz |
For ppp interfaces the real interface is not present anymore in the xml config section of the interface. Due to this do some more work on extracting the real interface when ipv4 is pppoe/ppp/... and ipv6 configuration files will use the wrong interface to request information from provider. Reported-by: http://forum.pfsense.org/index.php/topic,64483.0.html
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 87795f1..205e976 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3902,10 +3902,24 @@ function get_real_interface($interface = "wan", $family = "all") { $wanif = "{$interface}_stf"; break; default: - if( is_array($cfg['wireless']) || preg_match($g['wireless_regex'], $cfg['if'])) - $wanif = interface_get_wireless_clone($cfg['if']); - else - $wanif = $cfg['if']; + switch ($cfg['ipaddr']) { + case 'pppoe': + case 'ppp': + case 'l2tp': + case 'pptp': + $parents = get_parent_interface($interface); + if (!empty($parents[0])) + $wanif = $parents[0]; + else + $wanif = $cfg['if']; + break; + default: + if( is_array($cfg['wireless']) || preg_match($g['wireless_regex'], $cfg['if'])) + $wanif = interface_get_wireless_clone($cfg['if']); + else + $wanif = $cfg['if']; + break; + } break; } } else { |