diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-10-17 14:33:23 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-10-17 14:33:23 +0000 |
commit | b9004dfedfd70cb65e6907b8282be9e974a28a50 (patch) | |
tree | be3e19d36a61d2943272558d3d32aca5bda590e3 /etc | |
parent | 4199cc625975cceb57a5e65bab8dbb631a859808 (diff) | |
download | pfsense-b9004dfedfd70cb65e6907b8282be9e974a28a50.zip pfsense-b9004dfedfd70cb65e6907b8282be9e974a28a50.tar.gz |
Restore accidentally removed code with bigpond removal which is causing issues with pppoe/pptp.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index d8e48ce..9d46cd7 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1765,6 +1765,18 @@ function get_current_wan_address($interface = "wan") { break; case "pppoe": case "pptp": + /* get interface info with netstat */ + exec("/usr/bin/netstat -nWI " . escapeshellarg($realif) . " -f inet", $ifinfo); + if (isset($ifinfo[1])) { + $aif = preg_split("/\s+/", $ifinfo[1]); + $curwanip = chop($aif[3]); + + if ($curwanip && is_ipaddr($curwanip) && ($curwanip != "0.0.0.0")) + return $curwanip; + } + + return null; + break; /* carpdev support */ case "carpdev-dhcp": $viparr = &$config['virtualip']['vip']; |