diff options
author | Phil Davis <phil.davis@inf.org> | 2015-06-15 14:19:11 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-06-15 14:19:11 +0545 |
commit | 6c07db487164262f9191ad02805523bd153e0ba6 (patch) | |
tree | 0c266356179ac730233a16c0e3767a0c22514c4d /etc/inc/interfaces.inc | |
parent | 67d9685607eef7c679fda929ad4855be1b2f9dec (diff) | |
download | pfsense-6c07db487164262f9191ad02805523bd153e0ba6.zip pfsense-6c07db487164262f9191ad02805523bd153e0ba6.tar.gz |
Code spacing
and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index ae44af4..a192591 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -235,7 +235,7 @@ function interface_vlan_configure(&$vlan) { return; } $if = $vlan['if']; - $vlanif = empty($vlan['vlanif']) ? "{$if}_vlan{$vlan['tag']}" : $vlan['vlanif']; + $vlanif = empty($vlan['vlanif']) ? "{$if}_vlan{$vlan['tag']}" : $vlan['vlanif']; $tag = $vlan['tag']; if (empty($if)) { @@ -2020,12 +2020,12 @@ EOD; mwexec("/bin/ps auxww|grep \"{$interface}\" |grep \"[3]gstats\" | awk '{print $2}' |xargs kill"); foreach ($ports as $port) { if (preg_match("/huawei/i", implode("\n", $usbmodemoutput))) { - $mondev = substr(basename($port), 0, -1); + $mondev = substr(basename($port), 0, -1); $devlist = glob("/dev/{$mondev}?"); $mondev = basename(end($devlist)); } if (preg_match("/zte/i", implode("\n", $usbmodemoutput))) { - $mondev = substr(basename($port), 0, -1) . "1"; + $mondev = substr(basename($port), 0, -1) . "1"; } if ($mondev != '') { log_error("Starting 3gstats.php on device '{$mondev}' for interface '{$interface}'"); @@ -2169,7 +2169,7 @@ function interface_proxyarp_configure($interface = "") { mwexec_bg("/usr/local/sbin/choparp " . $args); } } else if (count($paa) > 0) { - foreach ($paa as $paif => $paents) { + foreach ($paa as $paif => $paents) { $paaifip = get_interface_ip($paif); if (!is_ipaddr($paaifip)) { continue; @@ -3162,7 +3162,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven if ($wancfg['spoofmac'] && ($wancfg['spoofmac'] != $mac)) { mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) . " link " . escapeshellarg($wancfg['spoofmac'])); - } else { + } else { if ($mac == "ff:ff:ff:ff:ff:ff") { /* this is not a valid mac address. generate a @@ -3963,7 +3963,7 @@ function DHCP6_Config_File_Advanced($interface, $wancfg, $wanif) { $id_assoc_statement_address .= ";\n"; } - $id_assoc_statement_address .= "};\n"; + $id_assoc_statement_address .= "};\n"; } $id_assoc_statement_prefix = ""; @@ -4005,7 +4005,7 @@ function DHCP6_Config_File_Advanced($interface, $wancfg, $wanif) { $id_assoc_statement_prefix .= "\n"; } - $id_assoc_statement_prefix .= "};\n"; + $id_assoc_statement_prefix .= "};\n"; } $authentication_statement = ""; @@ -4135,7 +4135,7 @@ EOD; $subnetmask = gen_subnet_mask($wancfg['alias-subnet']); $dhclientconf .= <<<EOD alias { - interface "{$wanif}"; + interface "{$wanif}"; fixed-address {$wancfg['alias-address']}; option subnet-mask {$subnetmask}; } @@ -4379,7 +4379,7 @@ function convert_real_interface_to_friendly_interface_name($interface = "wan", $ if (stripos($interface, "_vip")) { foreach ($config['virtualip']['vip'] as $counter => $vip) { - if ($vip['mode'] == "carp") { + if ($vip['mode'] == "carp") { if ($interface == "{$vip['interface']}_vip{$vip['vhid']}") { return $vip['interface']; } @@ -4452,7 +4452,7 @@ function convert_friendly_interface_to_friendly_descr($interface) { } else if (substr($interface, 0, 4) == '_vip') { if (is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $counter => $vip) { - if ($vip['mode'] == "carp") { + if ($vip['mode'] == "carp") { if ($interface == "{$vip['interface']}_vip{$vip['vhid']}") { return "{$vip['subnet']} - {$vip['descr']}"; } @@ -5438,7 +5438,7 @@ function get_interfaces_with_gateway() { $ints[$ifdescr] = $ifdescr; break; default: - if (substr($ifname['if'], 0, 4) == "ovpn" || + if (substr($ifname['if'], 0, 4) == "ovpn" || !empty($ifname['gateway'])) { $ints[$ifdescr] = $ifdescr; } @@ -5463,7 +5463,7 @@ function interface_has_gateway($friendly) { return true; break; default: - if (substr($ifname['if'], 0, 4) == "ovpn") { + if (substr($ifname['if'], 0, 4) == "ovpn") { return true; } $tunnelif = substr($ifname['if'], 0, 3); @@ -5494,7 +5494,7 @@ function interface_has_gatewayv6($friendly) { return true; break; default: - if (substr($ifname['if'], 0, 4) == "ovpn") { + if (substr($ifname['if'], 0, 4) == "ovpn") { return true; } $tunnelif = substr($ifname['if'], 0, 3); @@ -5671,7 +5671,7 @@ function get_interface_mac($interface) { ******/ function generate_random_mac_address() { $mac = "02"; - for ($x=0; $x<5; $x++) { + for ($x = 0; $x < 5; $x++) { $mac .= ":" . dechex(rand(16, 255)); } return $mac; |