summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-01 17:56:50 -0300
committerRenato Botelho <renato@netgate.com>2016-08-01 17:56:50 -0300
commitf2a230d98151886c6bd23708fd79321adda121b9 (patch)
tree32fb7a20ce8f1a216a29eb1c2255aa8037cc7866 /src/etc
parent8928c11948a8df3eb68149a7375945840e50819d (diff)
parent1cdf2c91cae0fd55be3ef8ca5c8a7d1dd61b25fd (diff)
downloadpfsense-f2a230d98151886c6bd23708fd79321adda121b9.zip
pfsense-f2a230d98151886c6bd23708fd79321adda121b9.tar.gz
Merge pull request #3062 from phil-davis/patch-1
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/interfaces.inc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 76ea359..1a25d6b 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -1764,8 +1764,8 @@ EOD;
/* Omit this, we maintain the default route by other means, and it causes problems with
* default gateway switching. See redmine #1837 for original issue
- * re-enabling this for now to fix issue with missing default gateway with PPPoE in some
- * edge case. redmine #6495 open to address.
+ * re-enabling this for now to fix issue with missing default gateway with PPPoE in some
+ * edge case. redmine #6495 open to address.
*/
if (($interface == "wan" && $founddefaultgw == false) || $setdefaultgw == true) {
$setdefaultgw = true;
@@ -3028,11 +3028,12 @@ function find_dhcp6c_process($interface) {
return intval($pid);
}
+
function kill_dhcp6client_process($interface) {
if (empty($interface) || !does_interface_exist($interface)) {
return;
}
-
+
$i = 0;
while ((($pid = find_dhcp6c_process($interface)) != 0) && ($i < 3)) {
/* 3rd time make it die for sure */
@@ -3044,7 +3045,6 @@ function kill_dhcp6client_process($interface) {
unset($i);
}
-
function interface_virtual_create($interface) {
global $config;
@@ -3982,7 +3982,7 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) {
$rtsoldscript .= "/usr/local/sbin/dhcp6c {$debugOption} -c {$g['varetc_path']}/dhcp6c_{$interface}.conf -p {$g['varrun_path']}/dhcp6c_{$wanif}.pid {$wanif}\n";
$rtsoldscript .= "/usr/bin/logger -t rtsold \"Starting dhcp6 client for interface {$interface}({$wanif})\"\n";
/* non ipoe Process */
- if (!isset($wancfg['dhcp6withoutra'])) {
+ if (!isset($wancfg['dhcp6withoutra'])) {
$rtsoldscript .= "if [ -f {$g['varrun_path']}/dhcp6c_{$wanif}.pid ]; then\n";
$rtsoldscript .= "\t/bin/pkill -F {$g['varrun_path']}/dhcp6c_{$wanif}.pid\n";
$rtsoldscript .= "\t/bin/sleep 1\n";
@@ -3991,10 +3991,10 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) {
$rtsoldscript .= "\t/bin/sleep 1\n";
}
$debugOption = isset($wancfg['dhcp6debug']) ? "-D" : "-d";
- if (!isset($wancfg['dhcp6withoutra'])){
+ if (!isset($wancfg['dhcp6withoutra'])) {
$rtsoldscript .= "/usr/local/sbin/dhcp6c {$debugOption} -c {$g['varetc_path']}/dhcp6c_{$interface}.conf -p {$g['varrun_path']}/dhcp6c_{$wanif}.pid {$wanif}\n";
$rtsoldscript .= "/usr/bin/logger -t rtsold \"Starting dhcp6 client for interface {$interface}({$wanif})\"\n";
- }
+ }
/* Add wide-dhcp6c shell script here. Because we can not pass a argument to it. */
if (!@file_put_contents("{$g['varetc_path']}/rtsold_{$wanif}_script.sh", $rtsoldscript)) {
printf("Error: cannot open rtsold_{$wanif}_script.sh in interface_dhcpv6_configure() for writing.\n");
@@ -4014,11 +4014,11 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) {
sleep(2);
}
if (isset($wancfg['dhcp6withoutra'])) {
- kill_dhcp6client_process($wanif);
-
+ kill_dhcp6client_process($wanif);
+
mwexec("/usr/local/sbin/dhcp6c {$debugOption} -x -c {$g['varetc_path']}/dhcp6c_wan.conf -p {$g['varrun_path']}/dhcp6c_{$wanif}.pid {$wanif}");
- mwexec("/usr/bin/logger -t mwtag 'Starting dhcp6 client for interface wan({$wanif} in IPoE mode)'");
- }
+ mwexec("/usr/bin/logger -t mwtag 'Starting dhcp6 client for interface wan({$wanif} in IPoE mode)'");
+ }
mwexec("/usr/sbin/rtsold -1 -p {$g['varrun_path']}/rtsold_{$wanif}.pid -O {$g['varetc_path']}/rtsold_{$wanif}_script.sh {$wanif}");
/* NOTE: will be called from rtsold invoked script
OpenPOWER on IntegriCloud