summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-10-17 14:33:23 +0000
committerErmal Luçi <eri@pfsense.org>2008-10-17 14:33:23 +0000
commitb9004dfedfd70cb65e6907b8282be9e974a28a50 (patch)
treebe3e19d36a61d2943272558d3d32aca5bda590e3 /etc
parent4199cc625975cceb57a5e65bab8dbb631a859808 (diff)
downloadpfsense-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.inc12
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'];
OpenPOWER on IntegriCloud