summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/filter.inc9
-rw-r--r--etc/inc/interfaces.inc86
-rw-r--r--etc/inc/pfsense-utils.inc6
-rw-r--r--etc/inc/services.inc4
-rwxr-xr-xetc/rc.linkup2
-rwxr-xr-xetc/rc.newwanip7
-rw-r--r--usr/local/www/wizards/setup_wizard.xml38
7 files changed, 16 insertions, 136 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 6c8460e..7ac7953 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2131,15 +2131,6 @@ pass in on \${$oc['descr']} proto tcp from any to any port = 1723 flags S/SA mod
EOD;
break;
- /* BigPond client enabled? */
- case "bigpond":
- $ipfrules .= <<<EOD
-# BigPond heartbeat rules
-anchor "bigpond"
-pass in quick on \${$oc['descr']} proto udp from any to any port = 5050 keep state label "BigPond heartbeat on {$oc['descr']}"
-
-EOD;
- break;
case "dhcp":
case "carpdev-dhcp":
$ipfrules .= <<<EOD
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index cc27250..d8e48ce 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1205,11 +1205,6 @@ function interface_configure($interface = "wan") {
interface_pptp_configure($interface);
break;
- case 'bigpond':
- /* just configure DHCP for now; fire up bpalogin when we've got the lease */
- interface_dhcp_configure($interface);
- break;
-
default:
if ($wancfg['ipaddr'] <> "" && $wancfg['subnet'] <> "") {
if (isset($wancfg['ispointtopoint']) && $wancfg['pointtopoint']) {
@@ -1518,13 +1513,15 @@ function interface_pppoe_restart($interface = "wan") {
function interface_pppoe_down($interface = "wan") {
global $g;
- sigkillbypid("{$g['varrun_path']}/pppoe_{$interface}.pid", "USR2");
+ killbypid("{$g['varrun_path']}/pppoe_{$interface}.pid");
sleep(1);
}
function interface_pppoe_up($interface = "wan") {
global $g;
- sigkillbypid("{$g['varrun_path']}/pppoe_{$interface}.pid", "USR1");
+ /* fire up mpd */
+ /* NB: keep in sync with interface_pppoe_configure */
+ mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']} -f mpd_{$interface}.conf -l mpd_{$interface}.links -p {$g['varrun_path']}/pppoe_{$interface}.pid pppoeclient");
sleep(1);
}
@@ -1655,70 +1652,16 @@ function interface_pptp_restart($interface = "wan") {
function interface_pptp_down($interface = "wan") {
global $g;
- sigkillbypid("{$g['varrun_path']}/pptp_{$interface}.pid", "USR2");
+ killbypid("{$g['varrun_path']}/pptp_{$interface}.pid");
sleep(1);
}
function interface_pptp_up($interface = "wan") {
global $g;
- sigkillbypid("{$g['varrun_path']}/pptp_{$interface}.pid", "USR1");
- sleep(1);
-}
-
-function interface_bigpond_configure($curwanip) {
- global $config, $g;
-
- $bpcfg = $config['bigpond'];
-
- if (!$curwanip) {
- /* IP address not configured yet, exit */
- return 0;
- }
-
- /* kill bpalogin */
- killbyname("bpalogin");
-
- /* wait a moment */
+ /* fire up mpd */
+ /* NB: Keep in sync with interface_pptp_configure */
+ mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']} -f mpd_{$interface}.conf -l mpd_{$interface}.links -p {$g['varrun_path']}/pptp_{$interface}.pid pptp");
sleep(1);
-
- /* get the default domain */
- $nfd = @fopen("{$g['varetc_path']}/defaultdomain.conf", "r");
- if ($nfd) {
- $defaultdomain = trim(fgets($nfd));
- fclose($nfd);
- }
-
- /* generate bpalogin.conf */
- $fd = fopen("{$g['varetc_path']}/bpalogin.conf", "w");
- if (!$fd) {
- printf("Error: cannot open bpalogin.conf in interfaces_wan_bigpond_configure().\n");
- return 1;
- }
-
- if (!$bpcfg['authserver'])
- $bpcfg['authserver'] = "dce-server";
- if (!$bpcfg['authdomain'])
- $bpcfg['authdomain'] = $defaultdomain;
-
- $bpconf = <<<EOD
-username {$bpcfg['username']}
-password {$bpcfg['password']}
-authserver {$bpcfg['authserver']}
-authdomain {$bpcfg['authdomain']}
-localport 5050
-
-EOD;
-
- if ($bpcfg['minheartbeatinterval'])
- $bpconf .= "minheartbeatinterval {$bpcfg['minheartbeatinterval']}\n";
-
- fwrite($fd, $bpconf);
- fclose($fd);
-
- /* fire up bpalogin */
- mwexec("/usr/local/sbin/bpalogin -c {$g['varetc_path']}/bpalogin.conf");
-
- return 0;
}
function get_real_wan_interface($interface = "wan") {
@@ -1822,19 +1765,6 @@ function get_current_wan_address($interface = "wan") {
break;
case "pppoe":
case "pptp":
- case "bigpond":
- /* 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'];
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 24bb640..f7be2a8 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3366,13 +3366,17 @@ function get_interface_gateway($interface) {
$gw = NULL;
$gwcfg = $config['interfaces'][$interface];
- if (is_ipaddr($gwcfg['gateway']))
+ if (is_ipaddr($gwcfg['gateway'])) {
$gw = $gwcfg['gateway'];
+ return $gw;
+ }
else if ($gwcfg['gateway'] <> "") {
if (is_array($config['gateways']['gateway_item']))
foreach($config['gateways']['gateway_item'] as $gateway) {
if($gateway['name'] == $gwcfg['gateway']) {
$gw = $gateway['gateway'];
+ return $gw;
+ /* NOTREACHED */
break;
}
}
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 2661810..381aca6 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -783,9 +783,7 @@ function services_proxyarp_configure() {
if (count($paa))
foreach ($paa as $paif => $paents) {
- if ($paif == "wan" && !(is_ipaddr($config['interfaces']['wan']['ipaddr']) ||
- ($config['interfaces']['wan']['ipaddr'] == "dhcp") ||
- ($config['interfaces']['wan']['ipaddr'] == "bigpond")))
+ if (!(is_ipaddr($config['interfaces'][$paif]['ipaddr'])))
continue;
$args = $config['interfaces'][$paif]['if'] . " auto";
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 3afbba4..69a0753 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -59,7 +59,6 @@
}
if($config['interfaces'][$iface]['ipaddr'] <> "dhcp" and
$config['interfaces'][$iface]['ipaddr'] <> "pppoe" and
- $config['interfaces'][$iface]['ipaddr'] <> "bigpond" and
$config['interfaces'][$iface]['ipaddr'] <> "pptp") {
log_error("Hotplug event detected for {$argument1} but ignoring since interface is not set for DHCP");
exec("/usr/sbin/arp -d -i {$argument1} -a");
@@ -83,6 +82,7 @@
if($config['interfaces'][$iface]['ipaddr'] <> "pppoe" and
$config['interfaces'][$iface]['ipaddr'] <> "pptp") {
/* do not reconfigure on hotplug events when using pppoe or pptp */
+ /* XXX: Why not?! */
log_error("HOTPLUG: Configuring wan interface {$argument1}");
interface_configure($iface);
}
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index afb21f9..2141835 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -82,14 +82,9 @@ exec("killall -HUP openvpn 2>/dev/null");
/* regenerate resolv.conf if DNS overrides are allowed or the BigPond
client is enabled */
-if (isset($config['system']['dnsallowoverride']) ||
- ($config['interfaces'][$interface]['ipaddr'] == "bigpond"))
+if (isset($config['system']['dnsallowoverride']))
system_resolvconf_generate(true);
-/* fire up the BigPond client, if necessary */
-if ($config['interfaces'][$interface]['ipaddr'] == "bigpond")
- interfaces_wan_bigpond_configure($curwanip);
-
/* perform RFC 2136 DNS update */
services_dnsupdate_process();
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index d7df809..bdc850e 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -162,11 +162,6 @@
<enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout
</enablefields>
</option>
- <option>
- <name>BigPond</name>
- <value>bigpond</value>
- <enablefields>bigpondusername,bigpondpassword,bigpondauthenticationserver,bigpondauthenticationdomain,bigpondminheartbeatinterval</enablefields>
- </option>
</options>
</field>
<field>
@@ -297,39 +292,6 @@
<description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
</field>
<field>
- <name>BigPond configuration</name>
- <type>listtopic</type>
- </field>
- <field>
- <name>BigPond Username</name>
- <type>input</type>
- <bindstofield>bigpond->username</bindstofield>
- </field>
- <field>
- <name>BigPond Password</name>
- <type>input</type>
- <bindstofield>bigpond->password</bindstofield>
- </field>
- <field>
- <name>BigPond Authentication server</name>
- <type>input</type>
- <bindstofield>bigpond->authserver</bindstofield>
- <description>If this field is left empty, the default ("dce-server") is used.</description>
- </field>
- <field>
- <name>BigPond Authentication domain</name>
- <type>input</type>
- <bindstofield>bigpond->authdomain</bindstofield>
- <description>If this field is left empty, the domain name assigned via DHCP will be used. Note: the BigPond client implicitly sets the "Allow DNS server list to be overridden by DHCP/PPP on WAN" on the System: General setup page.</description>
- </field>
- <field>
- <name>BigPond min heartbeat interval</name>
- <type>input</type>
- <typehint>seconds</typehint>
- <bindstofield>bigpond->minheartbeatinterval</bindstofield>
- <description> Setting this to a sensible value (e.g. 60 seconds) can protect against DoS attacks.</description>
- </field>
- <field>
<name>RFC1918 Networks</name>
<type>listtopic</type>
</field>
OpenPOWER on IntegriCloud